Special Access control permissions in Linux: Sticky Bit, setuid, setgid

Source: Internet
Author: User

1. Sticky Bit

Also called stricted deletion bit
Set the permission to delete and rename files in the directory.
If Sticky Bit is set for a directory, only the following three types of users have the permission to delete files in the directory.
1) root users (not necessarily root users)
2) directory owner or file owner
3) users with write permission on the file directory
The permission number representing Sticky Bit is 1
 
2. setuid and setgid www.2cto.com
Mainly for Executable File Settings
When a file with the setuid set is executed, it has the permission of the file owner.
The setgid object has the permission to group the object when it is executed.
The permission number indicating setuid is 2
The permission number indicating setgid is 4
Do not set setuid and setguid in the script file. It is said that hackers have many ways to use these two permission bits on the script.
 
You can set these three permission bits by adding one before the original three permission bits.
For example, chmod 2755 file sets the setuid permission for the file.
Add chmod U + s file directly to add the setuid permission to the file, and add the setguid permission to the file in chmod g + s file.
Chmod o + s file adds the sticky bit permission to the directory

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.