The Three Permission Groups
Every file and directory has three permission groups: Owner (the file creator), Group (users in the file's group), and Others (everyone else). Each group gets three permissions.
The Three Permission Types
- Read (r = 4): View file contents or list directory contents
- Write (w = 2): Modify file or create/delete files in directory
- Execute (x = 1): Run file as program or enter directory with
cd
Reading Permission Strings
When you run ls -la, you see strings like -rwxr-xr--. Break it into groups of three:
rwx→ Owner: read + write + executer-x→ Group: read + execute (no write)r--→ Others: read only
Octal (Numeric) Notation
Add the values: r(4) + w(2) + x(1). So rwxr-xr-- becomes 754:
- Owner: 4+2+1 = 7
- Group: 4+0+1 = 5
- Others: 4+0+0 = 4
Common Permission Patterns
755— Standard for executables and directories (owner full, others read+execute)644— Standard for regular files (owner read+write, others read)700— Private to owner only (SSH keys, secrets)777— Full access for everyone (almost never correct — security risk)600— Owner read+write only (private config files)
Using chmod
Numeric mode: chmod 755 myfile. Symbolic mode: chmod u+x myfile (add execute for user). Both work — numeric is faster for setting all permissions at once.
Calculate Instantly
Our Chmod Calculator lets you toggle permissions visually and generates the correct chmod command. No more guessing between 644 and 755.