Professional Documents
Culture Documents
Special Permissions: SUID, GUID, and Sticky Bit in Linux
Special Permissions: SUID, GUID, and Sticky Bit in Linux
SUID=4
SGID=2
Sticky=1
None=0
Remember that the normal values for chmod permissions for reading are “4”,
writing is “2”, and executing is “1”.
SUID -4
The SUID stands for Set User ID as the name indicates it sets the file or
directory permissions
to the user (owner or root user) permissions. The file or directory with the
SUID permissions has additional permissions, the same as the owner
permissions. This SUID makes you the root user for that file or directory. The
SUID permission has a special numeric value of “4”
command: fidsk
exp :
For example, the “/usr/sbin/fdisk” has the SUID permission, which can be
checked using the list directions “ls” command:
The output shows that “S” is set to the SUID permissions. The Uppercase “S”
means the owner does not have to execute permission, so this file is.
If the owner had the execute permissions, the SUID permission would be
Lowercase “s”
GUID – 2
The GUID is short for Group User ID, which means this permission allows the
file or directory to set the same permissions as the group in which that file or
directory is present. For instance, a file is a member of a group1, and after
setting the GUID to that file, its permissions are the same as the group1
permissions. The GUID permission has a numeric value of “2.
Sticky Bit -1