GNU bug report logs - #8391
chmod setuid & setguid bits

Previous Next

Package: coreutils;

Reported by: Christian <chris <at> computersalat.de>

Date: Thu, 31 Mar 2011 16:48:04 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Christian <chris <at> computersalat.de>
To: bug-coreutils <at> gnu.org
Subject: bug#8391: chmod setuid & setguid bits
Date: Thu, 31 Mar 2011 20:25:28 +0200
Hi Eric,

Am 31.03.2011 19:29, schrieb Eric Blake:
> On 03/31/2011 03:01 AM, Christian wrote:
>> Why can I only use symbolic modes for clearing ?
>>
>> ----snip chmod(1) ---
>> and you can set (but not clear) the bits with a numeric mode.
>> ----snip chmod(1) ---
>>
>> isn't "chmod 0755 DIR" explicit enough ?
> Thanks for the report.  However, this is not a bug.  POSIX states:
> http://pubs.opengroup.org/onlinepubs/9699919799/utilities/chmod.html
I did not told it a bug, yet ;)

I agree that having
drwxr-sr-x  2 root root  48 2011-03-31 18:13 tmp/
and doing a "chmod 755"
would have removed the s-gid-bit in the past.

e.g.:
hv-gate:~/test # chmod -v 755 tmp/
Modus von „tmp/“ nach 0755 (rwxr-xr-x) geändert
and I agree that this should not happen.

but:
when I want to remove the s-gid-bit it should be possible to do a
chmod 0755 tmp
and not to be forced to the "same" but more complicated version
chmod g=rx-s tmp

IMHO
for removing s-gid-bit from
drwxr-sr-x  2 root root  48 2011-03-31 18:13 tmp/
"u=rwx,g=rx-s,o=rx" == "0755"

and using "0755" is explicit enough, isn't it ?

Cheers

-- 

Christian
---------------------------------------------------
Der ultimative shop für Sportbekleidung und Zubehör

http://www.sc24.de
---------------------------------------------------





This bug report was last modified 13 years and 80 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.