chgrp resets the setuid and getgid bits

Ben Stringer ben at burbong.com
Tue Jul 25 09:44:14 UTC 2006


I observed this today on an RHEL4 system, and it applies to Fedora also.
I don't understand why this occurs - is it a security feature?

Eg.

# touch /tmp/example
# chmod 4755 /tmp/example
# ls -l /tmp/example
-rwsr-xr-x  1 root root 0 Jul 25 19:39 /tmp/example
# chgrp bin /tmp/example
# ls -l /tmp/example
-rwxr-xr-x  1 root bin 0 Jul 25 19:39 /tmp/example

If anyone can shed light on this for me, I would appreciate it.

Cheers, Ben




More information about the users mailing list