Linux File Permissions Cheat Sheet
1 min read
Table of Contents
Permission Bits
| Permission | File | Directory |
|---|---|---|
| r (4) | Read content | List contents |
| w (2) | Modify content | Create/delete files |
| x (1) | Execute | Enter directory |
chmod Examples
chmod 755 file.sh # rwxr-xr-x
chmod u+s binary # Set SUID
chmod g+s dir/ # Set SGID
chmod +t dir/ # Set sticky bit
Special Permissions
- SUID (4) — File executes as owner
- SGID (2) — File executes as group / new files inherit group
- Sticky Bit (1) — Only owner can delete files in directory
Finding SUID Binaries
find / -perm -4000 -type f 2>/dev/null
PrivEsc
SUID binaries are a common Linux privilege escalation vector. Always check GTFOBins for known exploits.
Related Posts
Vvveb | VulNyx Writeup
Compromised the Vvveb machine by identifying Vvveb CMS 1.0.5, discovering the exposed /system/secret endpoint and …
16 min read
#linux#web-enumeration
Zerotrace | VulNyx Writeup
Compromised the ZeroTrace machine by discovering a hidden .admin directory and exploiting LFI to enumerate /proc …
19 min read
#linux#web-enumeration
Trace | Vulnyx Writeup
Compromised the Trace machine by enumerating an exposed NFS share, discovering internal domains, bypassing a PHP …
13 min read
#linux#nfs
NorthWing | Vulnyx Writeup
Compromised the NorthWing machine by exploiting Local File Inclusion with a PHP filter wrapper, recovering and cracking …
10 min read
#linux#lfi