Linux Chmod Calculator
Calculate Linux and Unix chmod numeric (octal) and symbolic file permissions visually. Generate safe chmod commands for 755, 644, 600, and 400 with instant reference.
Standard Linux Production Permission Presets
| Octal | Symbolic | Recommended Use |
|---|---|---|
755 | rwxr-xr-x | Directories, CGI/shell scripts, compiled binaries |
644 | rw-r--r-- | Static HTML/CSS/JS, nginx configs, regular documents |
640 | rw-r----- | App config files shared only with a specific service group |
600 | rw------- | Private SSH keys (~/.ssh/id_ed25519), database credentials, .env secrets |
400 | r-------- | AWS/cloud PEM keys that should never be edited accidentally |
777 | rwxrwxrwx | Avoid in production — grants write & execute access to every local user |
Each digit sums three permission bits: Read = 4, Write = 2, Execute = 1. For directories, the execute bit (+x) controls whether users are allowed to traverse into the folder.
Frequently Asked Questions
Why does OpenSSH reject a 644 private key?
OpenSSH requires private keys to be readable only by the owner (600 or 400) so other system accounts cannot copy your credentials.
Why do directories need 755 instead of 644?
On Linux/Unix, the execute bit on a directory grants permission to enter (cd) and access files inside it. Setting 644 on a folder blocks non-root users from opening files inside.
Is chmod 777 safe on a web server?
No. 777 allows any local process or user to modify or execute files. Use 755 for folders and 644 (or 640/600 for secrets) instead.
Production Linux File Permission Reference Table
| Octal | Symbolic | Recommended Use |
|---|---|---|
600 | -rw------- | SSH private keys (id_ed25519), .env secrets |
644 | -rw-r--r-- | Static web files, Nginx configs, source code |
700 | drwx------ | ~/.ssh directory, private backup folders |
755 | drwxr-xr-x | Web root folders, executable CLI scripts |
Avoid chmod 777 on servers—it grants world-writable execution to every local process and frequently breaks SSH key authentication. See our complete Linux Chmod & IPv4 CIDR Cheatsheet.
Frequently Asked Questions
- Why does SSH reject my private key with Permissions are too open?
- OpenSSH requires private keys to be unreadable by group and others. Run chmod 600 on the key file and chmod 700 on the ~/.ssh folder.
- What does the execute bit (x) mean on a directory?
- On directories, execute permission allows traversing (cd) into the folder and accessing files inside by name.
- Why is chmod 777 dangerous in production?
- It allows any user or compromised service account on the host to modify or replace scripts and configs.