Chmod permissions calculator
Tick the permissions each class needs and get the octal number, the symbolic mode and the exact
chmod commands to run. Works for files and directories.
Presets:
| Class | Read (r) | Write (w) | Execute (x) | Octal |
|---|---|---|---|---|
| Owner (user) | 7 | |||
| Group | 5 | |||
| Others / public | 5 |
Octal mode
755 Symbolic mode
rwxr-xr-x chmod command
chmod 755 file Symbolic command
chmod u=rwx,g=rx,o=rx file World-writable permissions (777) let any local user modify the file. On shared hosting this is a common malware vector — prefer 755 for scripts and 644 for files.
Common permissions and what they mean
| Octal | Symbolic | Typical use |
|---|---|---|
| 755 | rwxr-xr-x | PHP scripts and directories the web server must execute. |
| 644 | rw-r--r-- | HTML, images, CSS and JS the web server only reads. |
| 600 | rw------- | wp-config.php, .env and other secrets only the owner should read. |
| 640 | rw-r----- | Config readable by a trusted group (e.g. web-server group) but not the public. |
| 755 vs 777 | — | 755 is almost always what you want. 777 grants write to everyone and is rarely correct. |
WordPress note: core files are typically 644 and directories 755. wp-config.php should be 600 or 640 where the web server runs as a different user. Many hosts apply permissions for you via the file manager or SSH.
Recommended hosts with SSH and file-manager permission tools: browse the directory. Back to all tools →