u => user, g => group, o => or others, a => all
# They are equivalent permissions:chmod o+rwx myfilechmod 007 myfile
In addition to the basic permissions, there are three other permissions that are used in certain situations.
SUID => Set User ID (for user):
chmod u+s my_file
SGID => Set Group ID (for group):
chmod g+s my_file
Sticky => for everyone:
chmod o+t my_file
SUID => When this is set on a file, script, or executable, it means to run that file or application with the permission of the owner. This is primarily used to elevate the privileges of the current user. Typically, this is run against a root file. It looks like the following:
Sticky => The sticky bit controls the deletion from the directory. When it is set, only the owner of the file will be able to delete that file. This is set on the directory level with a value of
When the lowercase
t is set, it shows the execute permission is set. When the uppercase
T, that means the execute permission is not set.
How to set a sticky bit: