Special permissions on the Linux file system
Permission model:
U, G, O
R, W, X
Security context for the process:
Prerequisite: The process is owned by the owner (the process is running as the user's identity);
(1) Whether the user can start an executable program file as a process, depending on whether the user has Execute permission on the program file;
(2) After the program is started as a process, the owner of the process is the current user, the initiator of the process, the group to which the process belongs, and the base group for the initiator;
(3) The access rights of the process, depending on the owner's access rights:
(a) The owner of the process and the owner of the document, the application document is the master authority;
(b) The owner of the process, belonging to the group of documents, the application file is a group of permissions;
(c) Apply other rights;
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 as a process, its owner is not the initiator, and the program file is the owner of its own, the mechanism is suid;
Permission settings:
chmod u+s FILE ...
chmod u-s FILE ...
Attention:
S: The owner of the original X permission;
S: The original owner has no x permission;
SGID:
By default, when a user creates a file, it belongs to the base group that the user is a member of;
Once a directory has been set with Sgid permissions, the user who has write permission to this directory has the same group as the directory, not the user's base group, to which the files created in this directory belong.
Permission settings:
chmod g+s FILE ...
chmod g-s FILE ...
Sticky:
For a multi-person writable directory, this permission is used to restrict each file that can only delete itself;
Permission settings
chmod o+t FILE ...
chmod o-t FILE ...
SUID, SGID, STICKY
000
001
010
011
100
101
110
111
chmod 4777 FILE
chmod 3755 DIR
Knowledge points for special permissions on the Linux file system (SUID, SGID, Sticky)