Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| rh124_advanced_permissions [2026/10/28 08:48] – [SGID bit for directories] rpjday | rh124_advanced_permissions [2026/10/28 14:01] (current) – [SGID bit for directories] rpjday | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== RH124 Advanced Permissions ====== | ====== RH124 Advanced Permissions ====== | ||
| + | |||
| + | ===== NOTE ===== | ||
| + | |||
| + | If you're running these commands as a non-root user, do not use the '' | ||
| + | |||
| + | ===== Enterable but not readable directories ===== | ||
| + | |||
| + | < | ||
| + | $ chmod 0111 Poems | ||
| + | $ ls -ld Poems | ||
| + | $ ls Poems | ||
| + | $ cat Poems/ | ||
| + | $ chmod 755 Poems | ||
| + | </ | ||
| ===== Strange permissions ===== | ===== Strange permissions ===== | ||
| Line 67: | Line 81: | ||
| so a full octal representation for any file permissions would be octal 7777 (regular settings are sometimes written 0755 or 0644 or whatever). | so a full octal representation for any file permissions would be octal 7777 (regular settings are sometimes written 0755 or 0644 or whatever). | ||
| - | ===== The setuid bit ===== | + | ===== The setuid bit for executable files ===== |
| This bit means that when you run this binary executable, it will **retain** its ownership: | This bit means that when you run this binary executable, it will **retain** its ownership: | ||
| Line 110: | Line 124: | ||
| </ | </ | ||
| - | ===== The setgid bit ===== | + | ===== The setgid bit for executable files ===== |
| No longer as popular but similar to above: | No longer as popular but similar to above: | ||
| Line 163: | Line 177: | ||
| /sys/fs/bpf | /sys/fs/bpf | ||
| /tmp | /tmp | ||
| - | /tmp/.X11-unix | + | ... snip ... |
| - | /tmp/.ICE-unix | + | |
| - | /tmp/.XIM-unix | + | |
| - | /tmp/.font-unix | + | |
| - | / | + | |
| - | / | + | |
| - | / | + | |
| - | / | + | |
| - | /var/tmp | + | |
| - | / | + | |
| - | / | + | |
| - | / | + | |
| - | / | + | |
| $ | $ | ||
| </ | </ | ||
| Line 205: | Line 207: | ||
| $ chmod g+s < | $ chmod g+s < | ||
| </ | </ | ||
| + | |||
| + | **NOTE**: There is no value for the SUID bit on directories. | ||
| ===== Ask Google ===== | ===== Ask Google ===== | ||