bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: chmod octal form of sgid/suid removal fails


From: Jan Engelhardt
Subject: Re: chmod octal form of sgid/suid removal fails
Date: Sat, 12 May 2007 22:28:25 +0200 (MEST)

On May 12 2007 12:07, Eric Blake wrote:
>
>According to Jan Engelhardt on 5/12/2007 8:50 AM:
>> Cc'ed bug-coreutils.
>> The following bug affects at least:
>>  coreutils 6.4 (used in opensuse 10.2 - open a bug report here)
>>  coreutils 6.9
>> 
>> $ mkdir /dev/shm/me
>> $ strace -e chmod chmod 0755 me
>> chmod("me", 02755)                      = 0
>
>Not a bug, and this is becoming a FAQ.  POSIX explicitly leaves the
>special mode bits undefined when using octal permissions.  And the NEWS
>for coreutils 6.0 is quite explicit:
[...]

Then the manpgea is broken instead:;

A numeric mode is from one to  four  octal  digits  (0-7),  derived  by
adding up the bits with values 4, 2, and 1.  Omitted digits are assumed
to be leading zeros, except that if  the  first  digit  is  omitted,  a
directory's  set  user  and  group ID bits are not affected.

Which seems to imply that if I specify a leading "0", they are affected.


        Jan
-- 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]