December 2018
Beginner
320 pages
8h 57m
English
The setgid special permission is used to enable group inheritance from the parent directory. When setgid is set on a directory, then files created in that directory will inherit the group affiliation from the parent directory, instead of inheriting it from the user who creates the file. It is generally used on collaborative (shared) directories to automatically change a file from the default user private group to the shared group.
The following command line is used to view the existing permission of a directory:
$ ls -ld mydir
The following example illustrates the usage of the chmod command to add the setgid permission to a directory:
$ chmod g+s mydiror$ chmod 2770 mydir$ ls -ld mydir
Here is a table listing special permissions ...
Read now
Unlock full access