2.2-Sticky of special permission

Source: Internet
Author: User

Sticky_bit also known as: anti-delete bit

Sticky_bit=1 prevent files from being deleted

Ordinary users can use VI to edit the root file, forced to save. (Deleting a source file, creating a file with the same name) is only the owner and the owning group become ordinary users. The normal user can also delete the root file. This is related to the W permission for the parent directory.

Sticky_bit works on a directory and has no meaning for files. Prevent ordinary users who are not owners from deleting this file.

These three permissions are actually very simple, I probably summarize:

1. suid is only valid for executable binaries , the typical example of the passwd command is to let the user executing this command temporarily execute as the owner of the file.

2. Sgid can function in the directory can also function in the file, the file must also be an executable binary file, the role is to let the user to execute this command temporarily as the file belongs to the identity of the group, and then this permission function in the directory, will be implemented, Any user who creates subdirectories or sub-files in this directory is consistent with that directory.

3. Stick Plain is anti-delete, only useful to the directory, the typical directory is/tmp, because the/tmp directory must be anyone can write, then anyone can delete any files, in order to secure, you have to set this stick permissions, to avoid others to delete my files


2.2-Sticky of special permission

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.