*NIX permissions are represented as one or more of the following:
Permission | Symbolic | Numeric |
---|---|---|
Read | r | 4 |
Write | w | 2 |
Execute | x | 1 |
SUID | s /S | 4 |
SGID | s /S | 2 |
Sticky Bit | t | 1 |
The SUID/SGID bits are applied to the user or group (respectively) when set symbolically; the sticky bit is applied to the “other” permission set. When set numerically, all three of these values are applied to the “prefix” digit.
Symbolically, the SUID/SGID bits can be represented as either s
or S
. The different is whether the user/group also has execute permissions (s
), or lacks these permissions (S
).