Re: mkdir bug?
On Mon 01 Nov 1999, Ashley Clark wrote:
>
> First the situation:
>
> $ ls -la
> total 8
> drwxrwsr-x 2 aclark mp3 4096 Nov 1 14:03 ./
> drwxr-sr-x 69 aclark aclark 4096 Nov 1 08:21 ../
>
> $ mkdir test1
> $ mkdir -p ./test2
Note that -p when creating a directory in the current directory is
pointless. -p implies "create any parent directories needed"; in
no situation can that be the case here.
> $ ls -la
> total 16
> drwxrwsr-x 4 aclark mp3 4096 Nov 1 14:03 ./
> drwxr-sr-x 69 aclark aclark 4096 Nov 1 08:21 ../
> drwxrwsr-x 2 aclark mp3 4096 Nov 1 14:03 test1/
> drwxrwxr-x 2 aclark mp3 4096 Nov 1 14:03 test2/
>
> Now, shouldn't test1 and test2 have the same permissions (rwxrwsr-x)?
You mean that test2 should also have the setgid bit set; test1 isn't
looked at in the mkdir operation.
Yes, this looks like a bug in mkdir -p. File a bug report against
fileutils. (I've noticed fileutils getting steadily worse over time,
e.g. ls -lu sorts on time now, while it should only do that if the -t
option is also specified; this worked correctly on fileutils 3.x).
Paul Slootman
--
home: paul@wurtel.demon.nl http://www.wurtel.demon.nl/
work: paul@murphy.nl http://www.murphy.nl/
debian: paul@debian.org http://www.debian.org/
isdn4linux: paul@isdn4linux.de http://www.isdn4linux.de/
Reply to: