Special file permissions

As you might have noticed in the part about octal notation, we always start the notation with a zero (0775, 0640, and so on). Why do we include the zero if we do not use it? That position is reserved for special file permissions: SUID, SGID, and the sticky bit. They have a similar octal notation (where SUID is 4, SGID is 2, and the sticky bit is 1) and are used in the following manner:

Files

Directories

SUID

Files are executed with the permissions of the owner, regardless of which user executes it.

Does nothing.

SGID

Files are executed with the permissions of the group, regardless of which user executes it.

Files that are created in this directory get the same group as the directory.

Sticky bit

Does nothing.

User can only delete their own files within this directory. See the /tmp/ directory for its most famous use.

 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.160.181