bug-coreutils
[Top][All Lists]
Advanced

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

Re: [bug #25848] chmod fails to clear sgid bit on absolute changes


From: Detlev Zundel
Subject: Re: [bug #25848] chmod fails to clear sgid bit on absolute changes
Date: Sat, 14 Mar 2009 12:42:02 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Hello Jim,

> Thanks for the report, but that is the documented behavior:
>
>   info coreutils 'file perm' dir

Ah, oh.  I didn't know this.  This actually violates the principle of
least surprise in my eyes, but hey, if it is documented, I am ok with
it.

Thinking some more about it, isn't the behaviour then wrong by clearing
the set-uid bit?

The doc says:

     If you want to try to clear these bits, you must mention them
  explicitly in a symbolic mode, e.g.:

But if I review my example, then I first set suid+sgid, then do a chmod
0 and suid is still set, but not suid:

address@hidden:tmp[0]$ mkdir foo ; $p/chmod 3777 foo ; ls -ld foo ; $p/chmod 0 
foo ; ls -ld foo
drwxrwsrwt 2 dzu dzu 4096 2009-03-13 15:28 foo
d-----S--- 2 dzu dzu 4096 2009-03-13 15:28 foo

Isn't this still a bug alas the other way round then I originally
thought?

Thanks
  Detlev

-- 
"Milk?" called Reg. "Er, please." "One lump or two?" "One, please." "Sugar?"

    Dirk Gently's Holistic Detective Agency, Douglas Adams




reply via email to

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