SGID attribute
Setting the SGID attribute on a directory : chmod g+s
If the SGID (Set Group Identification) attribute is set on a directory, files created in that directory inherit its group ownership.
If the SGID is not set the file’s group ownership corresponds to the user’s default group.
In order to set the SGID on a directory or to remove it, use the following commands:
chmod g+s directoryname
chmod g-s directoryname
When set, the SGID attribute is represented by the letter “s” which replaces the “x” in the group permissions:
ls -l directoryname
drwxrwsr-x 10 rmohan administrators 4096 Jun 14 10:29 directory
Recent Comments