[linux-cifs-client] Re: [CIFS] patchset to fix ephemeral modes and
implement "dynperm" mount option (respin #3)
jlayton at redhat.com
Fri May 23 00:01:58 GMT 2008
On Thu, 22 May 2008 17:10:32 -0500
"Steve French" <smfrench at gmail.com> wrote:
> One question on patch 1 -
> if the default file mode (or dir mode) on an inode which is newly
> lookedup (not in use) is e.g. 0555 but the file does not have the
> read-only dos attribute bit, looks like your code will report it as
> 0555 - should any of the write bits be set in the mode in this case?
I'd say no in this case. The admin requested 0555, so that's what he
should get, even if the file is technically writable on the server.
> Won't you get strange results if you chmod 0777 (which would work
> right...) then umount then mount again then stat?
Presuming that dynperm isn't enabled...
If he does a chmod 0777, then it depends on whether ATTR_READONLY is
set on the file on the server. If it isn't then this will have no
effect. If it is, then the bit will be cleared on the server. The
following stat, however will show no write bits since the admin
specified that they should all be turned off. Given that every inode on
this share will have no write bits turned on regardless of whether
ATTR_READONLY is set, I don't think it's really that strange.
This is the peril of so many mount options :-/
It can be difficult to predict what the union of them will be. The best
we can hope for is to define the behavior of each as best we can and
trust the admins to use them sanely.
Jeff Layton <jlayton at redhat.com>
More information about the linux-cifs-client