First, special authority Set_uid
Can only be used for binary executables, which allows the user to temporarily have the permissions of the file owner
For example: Normal does not have root permission, but the command to change password passwd and need root permission, so, passwd command is given Set_uid permissions, so that ordinary users can temporarily get root permission to change the password;
Usage is
chmod u+s
Second, special authority Set_gid
Similar to SET_UID usage
When acting on a file, you can allow the user to temporarily own the permissions of the group to which the file belongs.
When you create a new file or folder in a folder when you are acting on a folder, the owning group for the new file or folder is the same as the group that owns the parent folder
Usage is
chmod g+s /tmp/123/
Third, special permission Stick_bit
Anti-Delete, after adding this permission to the folder, no user can delete the files created by other users in the directory, but if there are subfolders and subfolders without the permissions of the subfolder, then the user within the subfolder may delete other user-created files, that is, there is no anti-deletion, only see the file's parent folder has T permissions
Usage
chmod o+t /tmp/123/
Four, soft link file
Similar to the shortcuts in Windows, taking up a small amount of memory space, deleting the source files will invalidate the soft connection, the soft connection can be used for files and folders, can be established across partitions, soft connections preferably use absolute path;
用法 ln -s [来源文件] [目的文件]
Five, hard connection file
I personally understand that as a hard link can be a person's other name, a person can have multiple names, but this person's entity only one, a name does not affect the use of other names,
Similarly, hard links do not occupy double space, the target and source of hard links to delete one, does not affect the use of another, hard-linked files have the same inode number, hard links can not be established across partitions, because different partitions will have the same inode number, hard links can only be used for files, can not be used for folders
Usage
ln [source file] [destination file]
Linux Learning Notes (ix) Set_uid, Set_gid, stick_bit, soft link files, hard connect files