Special permissions
The permissions or mode of a file you we will be familiar with is Read, Write, and eXecute (RWX). These permissions can be set to the three objects:
- User
- Group
- Others
The standard permissions are shown with their octal notation, should you want a quick revision exercise, as follows:
There is a fourth block of permissions that precedes user, group, and others. This block is for the special permissions; however, rather than representing RWX, the permissions comprise of:
- The set user ID (SUID) bit
- The set group ID (SGID) bit
- The sticky bit
Using symbolic notations, these permissions can be added to file1
, which acts as our axiom for the filename during the following demonstration:
$ chmod u+s file1 #adding the SUID Bit $ chmod g+s file1 #adding the SGID Bit $ chmod o+t file1 #adding the Sticky Bit
The SUID bit
The set user ID bit is used when a program needs to run using another user ID other than the user running the program. When set, the program runs with the permissions of the...