User Tools

Site Tools


linux:special_permissions_minihowto

Differences

This shows you the differences between two versions of the page.


Previous revision
linux:special_permissions_minihowto [2022/02/11 11:36] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== [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          ^
 +| <code>--S------</code>    | SUID is set, but user (owner) execute is not set.        |
 +| <code>--s------</code>    | SUID and user execute are both set. |
 +| <code>-----S---</code>    | SGID is set, but group execute is not set. |
 +| <code>-----s---</code>    | SGID and group execute are both set. |
 +| <code>--------T</code>    | Sticky bit is set, bot other execute is not set. |
 +| <code>--------t</code>    | Sticky bit and other execute are both set. |
 +
 +
 +
 +====== Applying ======
 +^ Permissions      ^ Apply          ^ Ressult ^
 +| <code>--S------</code>    | <code>chmod 4000 file</code> | <code>---S------ 1 root root 0 May 15 11:14 file</code> |
 +| <code>--s------</code>    | <code>chmod 4100 file</code> |<code>---s------ 1 root root 0 May 15 11:14 file</code> |
 +| <code>-----S---</code>    | <code>chmod 2000 file</code> |<code>------S--- 1 root root 0 May 15 11:14 file</code> |
 +| <code>-----s---</code>    | <code>chmod 2010 file</code> | <code>------s--- 1 root root 0 May 15 11:14 file</code> |
 +| <code>--------T</code>    | <code>chmod 1000 file</code> |<code>---------T 1 root root 0 May 15 11:14 file</code> |
 +| <code>--------t</code>    | <code>chmod 1001 file</code> |<code>---------t 1 root root 0 May 15 11:14 file</code>|