Chmod Permission Calculator
Visual file permission selector
Common Permission Presets
Reverse: Octal to Permissions
Quick Tips
Security First
Never use 777 on production servers. It gives everyone full access
Files vs Directories
Use 644 for files, 755 for directories as a safe default
Sensitive Files
Use 600 for private keys, passwords, and sensitive config files
Recursive
Use -R flag for recursive changes: chmod -R 755 /path/to/dir
Common Chmod Values Reference
Most commonly used permission values with their symbolic notation and typical use cases
| Octal | Symbolic | Owner | Group | Others | Use Case |
|---|---|---|---|---|---|
| 777 | rwxrwxrwx | rwx | rwx | rwx | ⚠️ Full access (avoid in production) |
| 755 | rwxr-xr-x | rwx | r-x | r-x | ✅ Default directory permissions |
| 700 | rwx------ | rwx | --- | --- | 🔒 Private directory (owner only) |
| 644 | rw-r--r-- | rw- | r-- | r-- | ✅ Default file permissions |
| 600 | rw------- | rw- | --- | --- | 🔒 Private file (owner only) |
| 666 | rw-rw-rw- | rw- | rw- | rw- | 📝 All can read/write (no execute) |
| 444 | r--r--r-- | r-- | r-- | r-- | 📖 Read-only for everyone |
| 555 | r-xr-xr-x | r-x | r-x | r-x | ▶️ Read & execute (no write) |
| 750 | rwxr-x--- | rwx | r-x | --- | 👥 Owner + group access |
| 770 | rwxrwx--- | rwx | rwx | --- | 👥 Owner + group full access |
| 640 | rw-r----- | rw- | r-- | --- | 📄 Owner write, group read |
| 400 | r-------- | r-- | --- | --- | 🔐 SSH private key (recommended) |
Permission Values Explained
Read (4)
Allows viewing file contents or listing directory contents
Write (2)
Allows modifying file or adding/removing files in directory
Execute (1)
Allows running file as program or entering directory
Octal Math
Add values: r(4) + w(2) + x(1) = 7 (full access)
Understanding Linux File Permissions
What is Chmod?
chmod (change mode) is a Linux/Unix command used to change file and directory permissions. It controls who can read, write, and execute files on the system.
Three User Categories
Every file has permissions for three categories of users:
- Owner (User): The user who created the file
- Group: Users in the file's group
- Others: Everyone else on the system
Three Permission Types
Each category can have three types of permissions:
- Read (r, value 4): View file contents or list directory
- Write (w, value 2): Modify file or add/remove files in directory
- Execute (x, value 1): Run file as program or enter directory
Octal Notation
Permissions are represented as a 3-digit octal number (0-7 for each digit):
- First digit: Owner permissions
- Second digit: Group permissions
- Third digit: Others permissions
- Example: 755 = Owner(7) + Group(5) + Others(5)
Calculating Octal Values
Add the values of enabled permissions:
- rwx = 4 + 2 + 1 = 7 (full access)
- r-x = 4 + 0 + 1 = 5 (read + execute)
- rw- = 4 + 2 + 0 = 6 (read + write)
- r-- = 4 + 0 + 0 = 4 (read only)
- --- = 0 + 0 + 0 = 0 (no access)
Command Examples
chmod 755 file.txt- Set rwxr-xr-xchmod 644 file.txt- Set rw-r--r--chmod -R 755 /dir- Recursive directory changechmod u+x file.sh- Add execute for owner
Security Best Practices
- Never use 777 on production servers
- Use 644 for regular files as default
- Use 755 for directories as default
- Use 600 for sensitive files (keys, passwords)
- Use 400 for SSH private keys (read-only for owner)
Advanced Tips
Principle of Least Privilege
Give users only the minimum permissions they need to do their job
Directory vs File
Directories need execute (x) to be entered, files need it to be run
Check Current
Use ls -l to view current permissions
Symbolic Mode
Use chmod u+x to add permissions without changing others
Understanding Linux File Permissions
Linux file permissions control who can access files and what they can do with them. The chmod command is essential for system administrators and developers to manage file security. Understanding octal notation (like 755, 644) is crucial for working with Linux systems.
Permission Values
Each permission has a numeric value:
- Read (r): Value 4 - View file contents or list directory
- Write (w): Value 2 - Modify file or add/remove files in directory
- Execute (x): Value 1 - Run file as program or enter directory
- Full Access (rwx): 4 + 2 + 1 = 7
Common Permission Patterns
Most commonly used permission values:
- 755 (rwxr-xr-x): Default for directories - owner has full access, others can read and execute
- 644 (rw-r--r--): Default for files - owner can read/write, others can only read
- 600 (rw-------): Private files - only owner can read and write
- 700 (rwx------): Private directories - only owner has full access
- 777 (rwxrwxrwx): Full access for everyone - avoid in production!
Security Best Practices
Follow these security guidelines:
- Never use 777 on production servers - it's a major security risk
- Use 644 for files and 755 for directories as safe defaults
- Use 600 for sensitive files like passwords and private keys
- Use 400 for SSH keys - read-only for owner is required by SSH
- Apply principle of least privilege - give only necessary permissions
Using This Calculator
Follow these steps:
- Step 1: Click on permissions for Owner, Group, and Others
- Step 2: Watch the octal value and symbolic notation update in real-time
- Step 3: See the chmod command ready to copy
- Step 4: Use presets for common permission patterns
- Step 5: Use reverse calculator to convert octal to symbolic
- Step 6: Check Common Values tab for reference
- Step 7: Read the Guide tab to learn more about chmod
More Computer & Developer Tools
Explore more computer and developer calculators in our collection, including Unix Timestamp Calculator, Binary/Hex Converter, and PX to REM Converter!