nfsacl umask inconsitency
Lennart Poettering <[email protected]> Sun, 23 May 2004 18:21:34 +0200
| Newsgroups | gmane.linux.file-systems.acl.devel |
|---|---|
| Organization | .phi. |
| Message-ID | <[email protected]> |
Hi!
I think I've found a bug in the nfsacl patch:
An ext3 filesystem /pub with ACLs enabled is exported from a local
server running Linux 2.4.26 with the acl patches (including nfsacl)
applied. A client running Linux 2.6.6 (with nfsacl) mounts this
directory via NFS. Both the client and the server use ports of the
nfs(acl) patches to the newer kernels I did myself. I thought that the
the ACLs on the server and on the client would behave identically, but
they do not. When a new file or directory is created locally on the
server, the mask of it becomes the default mask of the parent directory
(as I expected). However, when a new file or directory is created by
the client, the mask of it becomes the AND combination of the umask
and the default mask of the parent directory. This is quite annoying.
An example:
On the server:
<snip>
[lennart@cocaine] /pub$ umask
0022
[lennart@cocaine] /pub$ getfacl .
# file: .
# owner: root
# group: staff
user::rwx
group::rwx
group:staff:rwx
mask::rwx
other::r-x
default:user::rwx
default:group::rwx
default:group:staff:rwx
default:mask::rwx
default:other::r-x
[lennart@cocaine] /pub$ touch foo
[lennart@cocaine] /pub$ mkdir bar
[lennart@cocaine] /pub$ getfacl foo bar
# file: foo
# owner: lennart
# group: staff
user::rw-
group::rwx #effective:rw-
group:staff:rwx #effective:rw-
mask::rw-
other::r--
# file: bar
# owner: lennart
# group: staff
user::rwx
group::rwx
group:staff:rwx
mask::rwx
other::r-x
default:user::rwx
default:group::rwx
default:group:staff:rwx
default:mask::rwx
default:other::r-x
[lennart@cocaine] /pub$
</snip>
And the same on the client:
<snip>
[lennart@ecstasy] /pub$ umask
0022
[lennart@ecstasy] /pub$ getfacl .
# file: .
# owner: root
# group: staff
user::rwx
group::rwx
group:staff:rwx
mask::rwx
other::r-x
default:user::rwx
default:group::rwx
default:group:staff:rwx
default:mask::rwx
default:other::r-x
[lennart@ecstasy] /pub$ touch foo
[lennart@ecstasy] /pub$ mkdir bar
[lennart@ecstasy] /pub$ getfacl foo bar
# file: foo
# owner: lennart
# group: staff
user::rw-
group::rwx #effective:r--
group:staff:rwx #effective:r--
mask::r--
other::r--
# file: bar
# owner: lennart
# group: staff
user::rwx
group::rwx #effective:r-x
group:staff:rwx #effective:r-x
mask::r-x
other::r-x
default:user::rwx
default:group::rwx
default:group:staff:rwx
default:mask::rwx
default:other::r-x
[lennart@ecstasy] /pub$
</snip>
When the umask on the client is changed to 0002 it produces the same
result as the server with umask 0022.
The combination of a vanilla 2.6.1 with unmodified nfsacl patches from
acl.bestbits.at and vanilla 2.4.25 with unmodified acl patches from
acl.bestbits.at behaves exactly in the same way described above.
Thank you
Lennart
_______________________________________________
acl-devel mailing list
[email protected]
http://acl.bestbits.at/mailman/listinfo/acl-devel