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