[rhelv6-list] found a chmod bug in rhel 6.0

Kyle O'Donnell redhat at isprime.org
Thu Mar 24 17:11:00 UTC 2011


I think I found a bug with chmod, but I could just be misinformed...

It looks like the numerical permission syntax for setuid/setgid can only be
unset with the alphabetical syntax on directories.

755 permission set on at directory
# ls -lad at
drwxr-xr-x 2 root root 4096 Mar 24 11:35 at

add setgid
# chmod 2755 at
# ls -lad at
drwxr-sr-x 2 root root 4096 Mar 24 11:35 at

attempt to remove setgid
# chmod 0755 at
# ls -lad at
drwxr-sr-x 2 root root 4096 Mar 24 11:35 at
didnt work

another attempt to remove setgid
# chmod 755 at
# ls -lad at
drwxr-sr-x 2 root root 4096 Mar 24 11:35 at
also didn't work

and one more
# chmod g-s at
# ls -lad at
drwxr-xr-x 2 root root 4096 Mar 24 11:35 at
success

This doesn't appear to affect files only directories.


--kyleo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/rhelv6-list/attachments/20110324/a7e99244/attachment.htm>


More information about the rhelv6-list mailing list