Linux File Permissions Explained: The Visual Chmod Guide
Master Linux file permissions with this visual guide. Learn chmod notation, permission types, common permission sets, and use our interactive calculator.
What are File Permissions?
Every file and directory on a Linux or Unix system has three sets of permissions that control who can read, write, and execute that file. These permissions are assigned to three categories: the owner of the file, the group the file belongs to, and everyone else (others).
Understanding file permissions is essential for server administration, deploying web applications, and managing any Linux-based system. Incorrect permissions are one of the most common causes of permission denied errors.
The Three Permission Types
| Permission | Symbol | Number | What It Means |
|---|---|---|---|
| Read | r | 4 | View file contents or list directory contents |
| Write | w | 2 | Modify file contents or add/remove files in directory |
| Execute | x | 1 | Run the file as a program or enter the directory |
How Octal Notation Works
chmod 755 myfile.txt
^^^
||| Others: 5 (read + execute)
|| Group: 5 (read + execute)
| Owner: 7 (read + write + execute)| Number | Permissions | Meaning |
|---|---|---|
| 0 | --- | No permissions |
| 1 | --x | Execute only |
| 2 | -w- | Write only |
| 3 | -wx | Write and execute |
| 4 | r-- | Read only |
| 5 | r-x | Read and execute |
| 6 | rw- | Read and write |
| 7 | rwx | Read, write, and execute |
Most Common Permission Sets
| Chmod | Symbolic | Use Case |
|---|---|---|
| 644 | rw-r--r-- | Regular files (HTML, CSS, images) |
| 755 | rwxr-xr-x | Directories and scripts |
| 600 | rw------- | Private files (SSH keys, .env) |
| 700 | rwx------ | Private directories |
| 777 | rwxrwxrwx | Full access (avoid in production) |
Useful Chmod Commands
# Make a script executable
chmod +x deploy.sh
# Standard web file permissions
chmod 644 index.html
chmod 644 style.css
# Standard directory permissions
chmod 755 public/
# Protect sensitive files
chmod 600 .env
chmod 600 ~/.ssh/id_rsa
# Recursive permissions
chmod -R 755 /var/www/mysite/
find /var/www/mysite/ -type f -exec chmod 644 {} \;Calculate Permissions Visually
Our interactive Chmod Calculator lets you toggle checkboxes for each permission and see the octal number, symbolic notation, and chmod command in real time.
Free Chmod Calculator
Calculate Linux file permissions with interactive toggles. Get the octal code and command instantly.
Try it freeRelated Articles
YAML vs JSON: Differences, Use Cases, and Conversion Guide
Compare YAML and JSON formats side by side. Learn syntax differences, when to use which, and how to convert between them for Docker, Kubernetes, and configs.
DeveloperHow to Convert CSV Data to SQL INSERT Statements
Step-by-step guide to converting CSV files into SQL INSERT statements. Covers data types, escaping, bulk inserts, and a free automated converter tool.
DeveloperNumber Base Conversion: Binary, Octal, Decimal, and Hexadecimal
Master number system conversions with clear explanations and examples. Learn to convert between binary, octal, decimal, and hexadecimal with ease.