You are on page 1of 6

Special Permissions in Linux

Special permissions are the permissions that allow additional privileges to a


file or directory

The special permissions values are as follows:

 SUID=4
 SGID=2
 Sticky=1
 None=0

 Special-permission: It will change the file or directory SUID, GUID


and sticky bit permissions.
 user-permission: It alters the user (owner) permissions.
 group-permission: It changes the group permissions.
 others-permission: It changes the other user’s permissions.

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:

-rwsr-xr-x. 1 root root 114752 Mar 29 2023 /usr/sbin/fdisk*

The “s” in the file permissions represent the SUID permission.

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

The sticky bit permissions are special permissions applicable to


the directory only. These special permissions allow the user (owner) to delete
only their own directories and can not delete other users’ directories. The
sticky bit permissions are very useful in shared folders where users can only
delete their own directories. The Sticky bit permission has a numeric value of
“1”.
Thank you

Nischal Tech Support

You might also like