Permissions Overview
In Linux, multi-user security is enforced at the kernel level by assigning access permissions to every file and directory. Every object has an Owner (User), a Group, and Others (World), with three basic rights: Read (r), Write (w), and Execute (x).
-rwxr-xr-x consists of 10 characters. The first character denotes file type (- for regular file, d for directory), followed by 3 triads: Owner permissions (rwx), Group permissions (r-x), and Others permissions (r-x).Interactive Permission Visualizer
Use the interactive visualizer below to toggle octal modes (755, 644, 700, 777) and see how bits translate into symbolic notation:
Symbolic Mode String
Owner (User)
r (4) + w (2) + x (1)
Group
r (4) + - (0) + x (1)
Others (World)
r (4) + - (0) + x (1)
Octal (Numeric) vs Symbolic Notation
Each permission triad is calculated by summing numeric bit values: Read = 4, Write = 2, and Execute = 1.
| Bit Value | Symbol | Permission Granted | Directory Effect |
|---|---|---|---|
| 4 | r | Read contents of file | List files in directory (ls) |
| 2 | w | Modify / edit file contents | Create or delete files in directory |
| 1 | x | Run file as script or binary executable | Traverse directory (cd into directory) |
Interactive Terminal Sandbox
Practice running permission commands in this browser-side simulated terminal:
Type commands like ls -la, chmod 755 script.sh, pwd, whoami, ps aux...
Practice Exercise
Question 1: Production Web File Security
What octal mode should you assign to standard configuration files (like config.yaml) so that the file owner can read and write, but group members and others can only read?
Security Considerations
chmod -R 777 /var/www allows unauthenticated local users or compromised web processes to overwrite code files, inject backdoors, or execute root exploits.