On Sat, 1 Feb 2014, Bob Proulx wrote:
Fredrik Tolf wrote:
I can't really imagine that this behavior is intended, and it seems
to go against any reasonable principle of least surprise.

It is intended because that is the way traditional legacy Unix systems
have always behaved.  And because that is the legacy behavior it is
required by POSIX for reasons of legacy portability.

 http://pubs.opengroup.org/onlinepubs/009695399/utilities/mkdir.html

Huh, I was not aware of that.

One might argue that it should be mentioned in the manpage then, though; but I see that the texinfo manual does mention it, so perhaps that's intentional.

Can you produce a small test case that illustrates the ACL behavior?

Sure, here:

$ mkdir /tmp/a
$ cd /tmp/a
$ setfacl -m d:g::rwx .
$ mkdir b
$ mkdir -p c
$ ls -l
total 8
drwxrwxr-x+ 2 fredrik users 4096 Feb  2 10:38 b
drwxr-xr-x+ 2 fredrik users 4096 Feb  2 10:38 c

Ideally, b and c should be created with the same permissions.

It should be mentioned that what I would consider the expected behavior, and the behavior specified by POSIX would both be obtained if mkdir simply does not attempt to do anything special with the mode and/or umask whenever ((umask & 0300) == 0), the most common case anyway. Or, alternatively, just sets the umask to (umask & ~0300) before doing the -p operation.

If you wish a behavior change with regards to ACLs would you be so
kind as to request it upstream at coreut...@gnu.org?

Sure, I could do that, but I was under the impression that Debian generally preferred to handle bug reports internally. Was I mistaken about that?

--
Fredrik Tolf


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to