1) Suid : SUID is a special permission assigned to a file. These permissions allow the file to be executed with the privileges of the owner.
If a file was owned by the root user and has the setuid bit set, no matter who executed the file it would always run with root user privileges.
Example:
chmod u+s FileName
-rwsr-xr-x 1 root test-group 16720 Apr 26 16:36 click
2) Sgid (Set Group ID): When the Set Group ID bit is set, Every file created in the group will be created with group ownership and also executed files with the group ownership no matters who execute it.
Example:
chmod g+s direcotryName
drwxr-sr-x 2 root test-group 4096 Apr 26 16:36 permission
3) Sticky bit : Files can be protected in a directory from getting removed by other users who do not own it by preventing it with sticky bit. It is displayed at the same location as the x permission for others.
Example:
chmod +t directoryName
Example:
chmod +t directoryName
drwxr-xr-t 2 root test-group 4096 Apr 24 18:56 permission
No comments:
Post a Comment