Page 1 of 1

Unix Set Group ID feature question

Posted: Tue Mar 10, 2009 7:18 am
by TinyTim
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

:irate:

Posted: Fri Mar 13, 2009 12:36 pm
by TinyTim
Anyone?

Posted: Fri Mar 13, 2009 6:45 pm
by TonyT

Posted: Sat Mar 14, 2009 6:36 pm
by TinyTim
if the world has read and execute (r-x) and executes a process in a directory with SETGID enabled and group on directory has rwx then process will execute with group permissions and not users?

or, if world has r-- on a file, and setgid is enabled on the directory can they execute the program (world inherits group perm's with SETGID enabled?)? , or only members of the group can execute as the file would have rwx (mirrors group permissions set on the directory) -