SUID, SGID, Sticky
1 permissions
R, W, X
User, group, other
2 Security context
Premises: The process has a group of owners and genera;
(1) Any executable program file can be started as a process: depending on whether the initiator has EXECUTE permission on the program file;
(2) After initiating as a process, the owner of the process is the initiator, and the group of the process belongs to the initiator;
(3) When a process accesses a file, it depends on the initiator of the process:
(a) The initiator of the process, the owner of the same document: The application file is the master authority;
(b) The initiator of the process, belonging to the group of documents, the application file is a group of permissions;
(c) Application of the file "other" permission;
3 SUID
(1) Any executable program file can be started as a process: depending on whether the initiator has EXECUTE permission on the program file;
(2) After initiating the process, the owner of the process is the owner of the original program file;
Permission settings:
chmod u+s FILE ...
chmod u-s FILE ...
4 SGID
By default, when a user creates a file, the group is the base group to which the user belongs;
Once a directory has been set to Sgid, the user who has write permission to this directory is the group of the groups to which the files created in this directory belong;
Permission settings:
chmod g+s DIR ...
chmod g-s DIR ...
5 Sticky
For a multi-person writable directory, if the sticky is set, then each user can only delete their own files;
/tmp directory sticky permissions are set by default
Permission settings:
chmod o+t DIR ...
chmod o-t DIR ...
You can also use numbers to add special permissions:
Suid=4,sgid=2,sticky=1
For example: chome 4755 file to add suid permissions to files
Several permission bit mappings:
Suid:user, occupying the master's execution authority;
S: Owner has x permission
S: Owner does not have X permission
Sgid:group, occupy the group's execution permission bit;
S:group has x permissions
S:group no x permission
Sticky:other, occupying ohter's execution privilege bit;
T:other has x permissions
T:other no x permission
Special permissions under the Linux file system