Knowledge points for special permissions on Linux file systems (SUID, SGID, Sticky)

Source: Internet
Author: User

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)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.