1. When SUID runs a program, the corresponding process owner is the owner of the program file itself, not the owner of the initiator.
chmod u+s FILE
chmod u-s FILE
For general purposes, people without certain permissions can use the functions of certain files, such as allowing ordinary users to view and modify the passwd file whose user and group are both root.
2. When SGID runs a program, the corresponding process group is the owner of the program file itself, not the group of the initiator.
chmod g+s FILE
chmod g-s FILE
For general purposes, after giving SGID permission to a folder, all the people who can have w permission in this folder will create files/folders that belong to this folder, not their own basic group. Therefore, when all After everyone has the same additional group, the files created can be read and written by everyone.
3. Sticky is in a public directory, everyone can create a directory and delete their own files, but cannot delete other people's files
chmod o + t FILE
chmod ot FILE
Three special permission bits
Corresponds to: UID 4
GUIDE 2
Sticky 1
When a folder's permissions are 1755, 1 means Sticky.