As described in info page, that behaviour could be expected somehow: " A successful use of `chmod' clears the set-group-ID bit of a regular file if the file's group ID does not match the user's effective group ID or one of the user's supplementary group IDs, unless the user has appropriate privileges. Additional restrictions may cause the set-user-ID and set-group-ID bits of MODE or REF_FILE to be ignored. This behavior depends on the policy and functionality of the underlying `chmod' system call. When in doubt, check the underlying system behavior."
Anyway, I agree that this behaviour is confusing and user should be informed, that chmod used different mode than requested. I proposed that change to upstream at http://lists.gnu.org/archive/html/bug- coreutils/2008-10/msg00273.html (hopefully is the link correct, message was not reachable from archive list at the moment of the post). -- chmod not returning right exit code on SGID directory failure https://bugs.launchpad.net/bugs/187315 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
