rh124_advanced_permissions

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
rh124_advanced_permissions [2026/10/28 08:48] – [SGID bit for directories] rpjdayrh124_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 ''sudo'' command.
 +
 +===== Enterable but not readable directories =====
 +
 +<code>
 +$ chmod 0111 Poems
 +$ ls -ld Poems
 +$ ls Poems
 +$ cat Poems/twister
 +$ chmod 755 Poems
 +</code>
  
 ===== 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:
 </code> </code>
  
-===== 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 +
-/tmp/systemd-private-f5f7d1e9279c4beebbdb24085e4c3d82-dbus-broker.service-rm2smd/tmp +
-/tmp/systemd-private-f5f7d1e9279c4beebbdb24085e4c3d82-chronyd.service-KYCF1b/tmp +
-/tmp/systemd-private-f5f7d1e9279c4beebbdb24085e4c3d82-irqbalance.service-Xglrdp/tmp +
-/tmp/systemd-private-f5f7d1e9279c4beebbdb24085e4c3d82-systemd-logind.service-dLohsJ/tmp +
-/var/tmp +
-/var/tmp/systemd-private-f5f7d1e9279c4beebbdb24085e4c3d82-dbus-broker.service-lkWgGX/tmp +
-/var/tmp/systemd-private-f5f7d1e9279c4beebbdb24085e4c3d82-chronyd.service-n9CB6t/tmp +
-/var/tmp/systemd-private-f5f7d1e9279c4beebbdb24085e4c3d82-irqbalance.service-WjxydR/tmp +
-/var/tmp/systemd-private-f5f7d1e9279c4beebbdb24085e4c3d82-systemd-logind.service-LeW18R/tmp+
 $ $
 </code> </code>
Line 205: Line 207:
 $ chmod g+s <directory name> $ chmod g+s <directory name>
 </code> </code>
 +
 +**NOTE**: There is no value for the SUID bit on directories.
 ===== Ask Google ===== ===== Ask Google =====
  
  • rh124_advanced_permissions.1793177300.txt.gz
  • Last modified: 2026/10/28 08:48
  • by rpjday