Linux Special permissions on the 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 ...
Note:
S: The owner of the original has 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
The order just 4,2,1 very good memory
Example:
chmod 4777 FILE
chmod 3755 DIR
This article is from the "naïve Little Comrade" blog, please be sure to keep this source http://dengxi.blog.51cto.com/4804263/1691238
Linux Learning Path 4-Special permissions on the file system