setuid/setgid files
Posted: Tue Jan 18, 2005 8:34 am
Whenever I have a setgid file, grsec disallows any chmod of this file if there's no 'm' access to the object. For example I do a chmod o+rx on :
Maybe it is related to the fact that chmod wants to remove the setgid mode when changing the mode of html ? Or is it standard behavior to deny chmod on setgid/setuid files when there's not the 'm' flag on that file ?
BTW, is there a way to disallow setgid bit removal ? Is it possible to add current and wanted modes in grsec logs when a chmod is denied ?
But chmod g-s is allowed and then I can do chmod o+rx for example.drwxr-s--- 5 user www-data 4,0K 2005-01-17 21:10 html/
(restricted:G:/) denied chmod of /home/.../html by /bin/chmod[chmod:29321] ...
Maybe it is related to the fact that chmod wants to remove the setgid mode when changing the mode of html ? Or is it standard behavior to deny chmod on setgid/setuid files when there's not the 'm' flag on that file ?
BTW, is there a way to disallow setgid bit removal ? Is it possible to add current and wanted modes in grsec logs when a chmod is denied ?