1 Default Permissions
1 Each terminal has a umask permission to determine the default permissions for new files and new folders
2 Umask uses digital permissions to represent, say, 022
The default permissions for the 3 directory are 777-umask, and the default permissions for the files are 666-umask
4 The average user's umask is the 0002,root user's umask is 022
5 The permissions for the new file are 666-0002 = 664 => rw-rw-r--
Like I create a new file under my home directory named Linuxcast.net.
The permissions for the new folder (directory) are 777-0002 = 775 => rwxrwxr-x
Like my home directory to create a new folder Linux
6 use Umask to set the Umask value of the terminal
2 Special Permissions
1 There are three special privileges in addition to normal permissions
2 Impact of permissions on a file on the directory
SUID executes as a file-owning user without
Rather than the user who executed the file
Sgid Run as a file-owning group the owning group that created the new file in the directory is the same as the directory
Sticky users who do not have write access to the directory can delete the files they own
However, you cannot delete files owned by other users
3 Setting Special Permissions
1 setting Suid
chmod u+s filename
2 Setting Sgid
chmod g+s filename
3 Setting Sticky
chmod o+t filename
4 As with normal permissions special permissions can also be represented by numbers
SUID = 4
Grid = 2
Sticky = 1
See more highlights of this column: http://www.bianceng.cn/OS/Linux/