Thanks for taking the time to report this. The behaviour you describe
may seem surprising (and it was to me, too!), but is actually what the
man page describes:

       chmod preserves a directory's set-user-ID and set-group-ID bits  unless
       you  explicitly  specify otherwise.  You can set or clear the bits with
       symbolic modes like u+s and g-s, and you can set (but  not  clear)  the
       bits with a numeric mode.

So, you can clear the setgid bit on the directory in your example with
"chmod g-s Y", but not with "chmod 0775 Y". Since this is the defined
behaviour that others may have come to expect for both interactive use
and in long-established scripts, it's unlikely to be changed now.

** Package changed: bash (Ubuntu) => coreutils (Ubuntu)

** Changed in: coreutils (Ubuntu)
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/927218

Title:
  Unable to unset setguid bit

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/927218/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to