User Tools

Site Tools


linux:special_permissions_minihowto

[DOC] Linux special permissions

Meanings

Special Permissions On a File On a Directory
SUID or Set User ID A program is executed with the file owner's permissions (rather than with the permissions of the user who executes it). Files created in the directory inherit its UID.
SGID or Set Group ID he effective group of an executing program is the file owner group. Files created in the directory inherit its GID.
Sticky (bit) A program sticks in memory after execution. Any user can create files, but only the owner of a file can delete it.

Reading

Permissions Meaning
--S------
SUID is set, but user (owner) execute is not set.
--s------
SUID and user execute are both set.
-----S---
SGID is set, but group execute is not set.
-----s---
SGID and group execute are both set.
--------T
Sticky bit is set, bot other execute is not set.
--------t
Sticky bit and other execute are both set.

Applying

Permissions Apply Ressult
--S------
chmod 4000 file
---S------ 1 root root 0 May 15 11:14 file
--s------
chmod 4100 file
---s------ 1 root root 0 May 15 11:14 file
-----S---
chmod 2000 file
------S--- 1 root root 0 May 15 11:14 file
-----s---
chmod 2010 file
------s--- 1 root root 0 May 15 11:14 file
--------T
chmod 1000 file
---------T 1 root root 0 May 15 11:14 file
--------t
chmod 1001 file
---------t 1 root root 0 May 15 11:14 file
linux/special_permissions_minihowto.txt · Last modified: 2022/02/11 11:36 by 127.0.0.1