Unix Set Group ID feature question
Posted: Tue Mar 10, 2009 7:18 am
Unix question - can someone clarify the SETGID or SGID feature - I am trying to determine if I set the SETGID on a directory, and group has read / execute---permissions will display as "r - s" ---- will this allow a user to inherit the group privileges if set group ID is turned on?
Or does the feature only apply to files (sets permissions newly created files to that of the group that owns the directory)?
For instance, if I have a directory "test" with SETGID enabled with effective permissions being "drxwr-s---" and most files under the directory having the following set permissions "rxwr-x---" what does this allow a member of the "Anyone" group to do to the directory or its contents? Anything? Will they inherit the "r-x" that the group has (setting the users group ID to that of the group that owns the directory)?
I have been googling for a while and seem to have confused myself, yet again

Or does the feature only apply to files (sets permissions newly created files to that of the group that owns the directory)?
For instance, if I have a directory "test" with SETGID enabled with effective permissions being "drxwr-s---" and most files under the directory having the following set permissions "rxwr-x---" what does this allow a member of the "Anyone" group to do to the directory or its contents? Anything? Will they inherit the "r-x" that the group has (setting the users group ID to that of the group that owns the directory)?
I have been googling for a while and seem to have confused myself, yet again