Chmod Calculator
Calculate Unix/Linux file permissions visually and get the exact chmod command, in both symbolic and numeric formats. Free, instant.
| Entity | Read (r) | Write (w) | Execute (x) | Octal | Symbolic |
|---|---|---|---|---|---|
| Owner (u) | 6 | rw- | |||
| Group (g) | 4 | r-- | |||
| Others (o) | 4 | r-- |
chmod 644 filenameUnderstanding Unix file permissions
Every file and directory on a Unix or Linux system has three permission sets — for the owner, the group, and all other users. Each set has three bits: read, write, and execute. The POSIX chmod utility defines how these permissions are changed. Getting permissions right is critical for both security and functionality.
How to read the symbolic notation
When you run ls -l, the first column shows permissions like -rwxr-xr-x. The first character is the file type (- for file, d for directory). The next 9 characters are three groups of rwx: owner permissions, group permissions, and other permissions. A dash (-) means that permission is not granted.
Common permission scenarios
- 644: Standard file — owner can edit, everyone can read.
- 755: Standard directory or executable — owner has full access, others can read and traverse.
- 600: Private files like SSH keys — only the owner can read or write.
- 400: Read-only private file — owner can read, nobody else can do anything.
- 777: Full access to everyone — use only when absolutely necessary and never in production.
Common use cases
Web developers use the calculator to look up the correct octal value for web server files — 644 for PHP and HTML files, 755 for directories — before running the chmod command via SSH on a shared hosting server. System administrators generating SSH key pairs set the private key to 600 using the ready-to-run command the tool outputs. DevOps engineers configuring deployment scripts verify the correct permission for shell scripts (755 to make them executable) without memorising the octal notation. Linux beginners use the visual checkbox interface to understand the permission system interactively before graduating to the command line.
Frequently asked questions
- What do Unix file permissions mean?
- Unix file permissions control who can read (r=4), write (w=2), and execute (x=1) a file or directory. Permissions are set for three entities: the file owner (u), the group (g), and everyone else (o). The combined octal value is expressed as digits, e.g., 755.
- How does octal permission notation work?
- Each digit in the octal notation represents permissions for one entity (owner, group, others) as a sum: read=4, write=2, execute=1. So rwx=7, rw-=6, r-x=5, r--=4, -wx=3, -w-=2, --x=1, ---=0. The permission 755 means owner has rwx (7), group has r-x (5), others have r-x (5).
- What is the correct permission for a web server file?
- Typically 644 (rw-r--r--) for files and 755 (rwxr-xr-x) for directories. This gives the owner read/write access, and read-only access to the web server process (which usually runs as a different user). Avoid 777 on web-accessible files — it is a security risk.
- What is 777 permission and is it safe?
- Permission 777 (rwxrwxrwx) gives everyone full read, write, and execute access. It is almost never appropriate for production files. It is a security vulnerability — any user or process on the system can modify or execute the file. Use only in controlled development environments.
- How do I apply chmod recursively?
- Use the -R flag: chmod -R 755 /path/to/directory. This applies the permission to the directory and all files and subdirectories inside it. Be careful — applying execute permission recursively to files that are not scripts can cause issues. Use find to apply different permissions to files vs. directories: find /path -type f -exec chmod 644 {} \; && find /path -type d -exec chmod 755 {} \;
Related tools
- JSON Formatter, Validator & Repair Tool
Format, minify, validate, and repair JSON in your browser. Sort keys, auto-format on paste, escape/unescape strings — free, no sign-up, 100% client-side.
- QR Code Generator
Generate QR codes for URLs, text, Wi-Fi, contact cards, and more — customize the design, then download instantly as PNG. Free, no sign-up.
- Password Generator
Generate strong, random passwords with custom length and character sets — uppercase, numbers, symbols. Check strength instantly. Free, no sign-up.
- Base64 Encoder / Decoder
Encode text to Base64 or decode Base64 back to plain text instantly in your browser — no upload, no sign-up, and nothing leaves your device.
- URL Encoder / Decoder
Encode or decode URLs and query strings with percent-encoding instantly in your browser — handles special characters and full URIs. Free, no sign-up.