🔐 Linux File Permissions: explained like a human
In Linux, permissions use 3-digit octal numbers like 755 or 644.
Each digit represents permissions for:
👤 Owner (User)
👥 Group
🌍 Others
Permission values:
- Read (r) = 4
- Write (w) = 2
- Execute (x) = 1
How to remember keep 4 as constant and then add:
7 = rwx (4+2+1)
6 = rw- (4+2)
5 = r-x (4+1)
Examples:
755 → rwx r-x r-x
644 → rw- r-- r--
Once you get this, chmod stops feeling like magic.
Linux Device Drivers is still one of the best reads if you want to understand how the kernel talks to hardware.
You'll want some C and basic Unix syscall knowledge, but the examples make it easy to just go through and start learning.