From: "Urs Fleisch" <urs.fleisch@gmail.com>
To: "Steve French" <smfrench@austin.rr.com>
Cc: linux-kernel@vger.kernel.org, linux-cifs-client@lists.samba.org
Subject: Re: CIFS: reset ATTR_READONLY on Windows
Date: Wed, 28 Mar 2007 09:16:56 +0200 [thread overview]
Message-ID: <57290de70703280016n2c79cb4cg6aab4da7a8a10b0f@mail.gmail.com> (raw)
In-Reply-To: <1174620936.4401.15.camel@smf-t60p.smfdom>
> Would you take a look at it?
The patch looks fine, similar to mine, I also used a flag when trying
to send a zero attribute to the server, but removed it later to reduce
the number of differences.
>> I made another small change: The ATTR_READONLY is only cleared if all
>> writeable bits are set in the Linux permissions (the file is writeable for
>> user, group and others). This is caused by the check ((mode &
>> S_IWUGO) == S_IWUGO). I think that this does not make sense, as soon
>> as any write flag is set, the file is no longer read-only.
>
> I agree that the 2nd change is intuitive, but it changes behavior slightly
> more - and this close to the next point release coming out I would
> rather fix the bug the least risky way.
The current behavior is not only unintuitive, it is also inconsistent.
When having a file_mode of 0755, read-only files on the Windows share
have permissions "-r-xr-xr-x" on the CIFS client, and writeable files
"-rwxr-xr-x". However, to make a file writeable, setting its
permissions to "-rwxr-xr-x" is not sufficient, you have to set
"-rwxrwxrwx". When setting permissions from the shell or a file
manager, it is possible to cope with it, however, if an application
has to control the read-only state, you have to set the file_mode to
0777, the umask to 0000 and hope that this will make the application
set all writeable bits. We have people that use subversion working
copies on Windows shares and want the read-only attribute to be set
correctly when locking and unlocking files.
prev parent reply other threads:[~2007-03-28 7:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-23 3:35 Steve French
2007-03-28 7:16 ` Urs Fleisch [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57290de70703280016n2c79cb4cg6aab4da7a8a10b0f@mail.gmail.com \
--to=urs.fleisch@gmail.com \
--cc=linux-cifs-client@lists.samba.org \
--cc=linux-kernel@vger.kernel.org \
--cc=smfrench@austin.rr.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®