Linux Special permissions on the file system (SUID, SGID, Sticky)
SUID :
Any executable program file can be started as a process: depending on whether the initiator has EXECUTE permission on the program file;
After initiating as a process, its owner is not the initiator, and the program file belongs to the owner; this mechanism is suid;
Permission settings:
chmod u+s FILE ...
chmod u-s FILE ...
Attention:
S: The owner of the original has 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 ...
Special permissions on Linux file systems (SUID, SGID, Sticky)