GNU bug report logs -
#8391
chmod setuid & setguid bits
Previous Next
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
Message #44 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi,
On Thu, 2011-03-31 at 14:15 -0600, Eric Blake wrote:
> On 03/31/2011 01:58 PM, Christian wrote:
> > Hi Paul,
> >
> > Am 31.03.2011 20:54, schrieb Paul Eggert:
> >> On 03/31/2011 11:25 AM, Christian wrote:
> >>> and using "0755" is explicit enough, isn't it ?
> >> Unfortunately it's not that simple, as having 0755 mean
> >> something different from 755 would violate the principle
> >> of least surprise. Please see the thread starting at
> >> <http://lists.gnu.org/archive/html/bug-coreutils/2006-07/msg00124.html>.
> > I read it and I came to the conclusion
> > 755 should preserve s-bit: OK
> > 2755 sould set sbit. OK
> > 0755 should remove sbit, cause it is explicit wanted.
> > and not doing so is a "lemming behaviour".
>
> No, 0755 is not explicit - it is ambiguous with people that are
> explicitly using printf %#3o to output a 3-digit octal string with
> leading 0 - I don't think we can change this.
I just want to mention recent RH bugzilla report about the same issue -
https://bugzilla.redhat.com/show_bug.cgi?id=691466 ... one of the ideas
in this bugzilla is that because of the ambiguity of the 0755 (and
similars) it would be very good to actually inform user in the case that
the special bit was not cleared (so only in the case that
SUID/SGID/sticky bits are set). Maybe only in verbose mode, but I think
it will be improvement for the current situation. What do you think?
> But my suggestion of 00755 _is_ explicit - after taking off the leading
> 0 for specifying octal, you are _still_ left with four octal digits
> which includes the sticky bit explicitly being set to 0.
I really like the 00XXX suggestion - do you plan to implement that
yourself? If you don't have time for writing it but this solution is
generally acceptable compromise, I could try to prepare a patch for
that.
Greetings,
Ondrej Vasik
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.