0% found this document useful (0 votes)
6 views1 page

SUID SGID and the Sticky Bit

The document explains special permissions in Unix-like systems, specifically SUID, SGID, and the Sticky Bit, which can be set using the chmod command. SUID allows executable files to run with the owner's permissions, while SGID allows files to execute with the group’s permissions, and when set on directories, it ensures new files inherit the directory's group. The Sticky Bit prevents users from deleting files they do not own in a directory, and these permissions are represented by specific letters in the file permission notation.

Uploaded by

akym
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views1 page

SUID SGID and the Sticky Bit

The document explains special permissions in Unix-like systems, specifically SUID, SGID, and the Sticky Bit, which can be set using the chmod command. SUID allows executable files to run with the owner's permissions, while SGID allows files to execute with the group’s permissions, and when set on directories, it ensures new files inherit the directory's group. The Sticky Bit prevents users from deleting files they do not own in a directory, and these permissions are represented by specific letters in the file permission notation.

Uploaded by

akym
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

"Managing Files Using Bash and Z Shell" course by Mateo Prigl at Pluralsight

SUID, SGID and the Sticky Bit


There are also some more special permissions. You can add this by prepending
another number in the numeric mode of the chmod command. These special
permissions are SUID (4), SGID (2) and the Sticky bit (1).
SUID and SGID are usually set on the executable files. If the SUID is set on an
executable file, that means that the file will be executed from the file owner. In
other words, the effective user that runs that file will be the file owner, no
matter who you are logged in as.
Same goes for the SGID. The file will be executed with the member of the file
group, it doesn't matter if you belong to that group.
If the SGID is set ona a directory, all of the files created in it will have the same
file group as that directory.
Sticky bit is usually just set on directories. It will prevent anyone from
modifiying files in that directory, with the exception of the files they own. Only
the owner will be able to remove his own files and noone else.
These permissions will be shown instead of the x execute permissions. s in the
place of the file owners execute permissions means that the SUID is set on that
file. SGID will be represented with s also, but in the place of the file groups x
bit. t represents sticky bit in the place of the others permissions execute bit. If
these letters are lower-case, that means that the underlying execute bit is also
set on the file. If they are upper-cased that means that the execute bit is not set
in that place.

1/1 © Copyright 2020 by Pluralsight

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy