Chmod Calculator
Tick the permissions or type a number like 755 and get the symbolic form and the chmod command. Free Linux and Unix file permissions calculator.
| Class | Read (4) | Write (2) | Execute (1) |
|---|---|---|---|
| Owner (user) | |||
| Group | |||
| Others (world) |
Three digits 0–7, for example 644.
Nine characters, for example rw-r--r--.
chmod 755 filenameSame result with symbolic notation: chmod u=rwx,g=rx,o=rx filename · ls -l shows -rwxr-xr-x
How to use the chmod calculator
- Tick read, write and execute for the owner, the group and others, or type a number (755) or letters (rwxr-xr-x). All views stay in sync.
- Optionally type the file or directory name and tick Recursive to include everything inside a directory.
- Copy the command and run it in your terminal.
Worked example
A deploy script should be runnable by you and readable by others. Tick owner read+write+execute (7), group read+execute (5) and others read+execute (5): that is 755, rwxr-xr-x, and the command is chmod 755 deploy.sh. For a private SSH key, owner read+write only gives 600.
Common chmod permissions
| Mode | Symbolic | Typical use |
|---|---|---|
| rw-r--r-- | Regular files: owner reads and writes, everyone else reads. Default for web content and config files. | |
| rwxr-xr-x | Directories and executables: owner full control, everyone else can read and run/enter. | |
| rw------- | Private files such as SSH private keys and .env files: only the owner can read and write. | |
| rwx------ | Private directories and scripts, for example ~/.ssh: only the owner has any access. | |
| rw-rw-r-- | Shared files where a group of users should also be able to edit. | |
| rwxrwxr-x | Shared directories where a group needs write access. | |
| r-------- | Read-only for the owner, for example a key or certificate you never want to overwrite by accident. | |
| rwxrwxrwx | Avoid. Everyone can read, write and execute. Almost never correct: any user or compromised process can modify it. |
Select a mode to load it into the calculator. Digits are owner, group, then others; read = 4, write = 2, execute = 1.
Frequently Asked Questions (FAQ)
The owner can read, write and execute (7 = 4+2+1); the group and everyone else can read and execute (5 = 4+1) but not write. In symbolic form that is rwxr-xr-x. It is the usual mode for directories, scripts and programs.
Each digit is the sum of the permissions for one class: read = 4, write = 2, execute = 1. The three digits are the owner (user), the group and others, in that order. So 6 = 4+2 = read and write, and 644 means owner rw-, group r--, others r--.
644 has no execute bit, so it suits ordinary files such as HTML, images and config files. 755 adds execute for everyone, which is needed to run a script or program and to enter (cd into) a directory.
777 lets every user on the system read, write and execute the file. On a web server this lets a compromised or malicious process modify your code or upload scripts. If a permissions error tempts you to use 777, fix the owner or group instead (chown, chgrp) and use 755 or 775.
A private key such as ~/.ssh/id_ed25519 should be 600 (or 400), and the ~/.ssh directory 700. OpenSSH refuses to use a private key that other users can read, with the message "UNPROTECTED PRIVATE KEY FILE".
For a directory, execute means permission to enter it and access items inside by name. Read lets you list the names. Without execute on a directory you cannot open the files in it, even if the files themselves are readable.
This calculator covers the standard nine permission bits, which is what chmod is used for in most cases. Special bits add a leading fourth digit (for example 4755 for setuid, 1777 for a sticky /tmp-style directory); they are outside what this tool sets.
Related Tools
- Diff CheckerCompare two text files and highlight differences visually.
- JSON to TypeScript ConverterPaste JSON and get TypeScript interfaces or types with nested objects, arrays and optional fields. Runs in your browser.
- YAML to JSON Converter (and JSON to YAML)Convert YAML to JSON or JSON to YAML with line-numbered errors, indent options, copy and download. Runs in your browser.
- Docker Run to Docker Compose ConverterPaste a docker run command and get a docker-compose.yml service: image, ports, volumes, env vars, restart, network and more. Unsupported flags are listed. Runs in your browser.
- cURL to fetch, Axios and Python requests ConverterPaste a cURL command and get JavaScript fetch, Axios or Python requests code. Parsed in your browser; nothing is uploaded.
- Cron Expression Generator and ExplainerBuild cron expressions from dropdowns, explain them in plain English and preview the next 5 run times in your timezone.