Quick Answer — What Does linux chmod 755 Mean?
Running chmod 755 (drwxr-xr-x) gives the Owner (7) full Read + Write + Execute rights, while the Group (5) and Public / Others (5) can only Read and Execute (or enter a directory) without modifying anything. It is the universal production standard for Linux web directories (/var/www/html) and executable scripts (deploy.sh).
When you hit Permission denied on a Linux server or VPS, forum answers frequently tell you to run chmod 777. Never do that in production. Below is the exact breakdown of 755 vs 644 vs 600, why OpenSSH rejects loose private keys, and how to generate verified octal and symbolic commands offline.
How Linux File Permissions Work (Octal & Symbolic)
Every file and directory in Linux has three permission classes:
| User Class | Symbol | Meaning |
|---|---|---|
| Owner (user) | u | The account that owns the file or folder |
| Group | g | Other Linux accounts belonging to the file's assigned group (e.g., www-data) |
| Others (public) | o | Every other user or process on the system |
Each class sums three permission bits:
| Permission | Symbol | Octal Value | On a File | On a Directory |
|---|---|---|---|---|
| Read | r | 4 | View file contents | List directory contents (ls) |
| Write | w | 2 | Edit or overwrite file | Create, rename, or delete files inside |
| Execute | x | 1 | Run as a script or binary | Enter / traverse the directory (cd) |
Read (4) + Write (2) + Execute (1) = 7 → rwx (Full access)
Read (4) + Write (2) = 6 → rw- (Read & write, no execute)
Read (4) + Execute (1) = 5 → r-x (Read & execute/traverse)
Read (4) = 4 → r-- (Read only)
No bits = 0 → --- (No access)
chmod 755 vs chmod 644 vs chmod 600 vs 777 (Production Matrix)
| Octal | Symbolic (ls -l) | Owner / Group / Others | Security Level | Exact Production Use Case |
|---|---|---|---|---|
755 | drwxr-xr-x | rwx / r-x / r-x | Safe | Nginx/Apache web directories (/var/www/html), executable scripts (.sh) |
644 | -rw-r--r-- | rw- / r-- / r-- | Safe | Static web files (index.html, CSS, JS, images), public config files |
700 | drwx------ | rwx / --- / --- | Hardened | Private folders like ~/.ssh (required by OpenSSH) |
600 | -rw------- | rw- / --- / --- | Hardened | SSH private keys (~/.ssh/id_rsa), .env, WordPress wp-config.php |
400 | -r-------- | r-- / --- / --- | Hardened | Read-only AWS EC2 .pem keys (prevents accidental edits) |
777 | -rwxrwxrwx | rwx / rwx / rwx | Dangerous | World-writable — any local user or compromised script can overwrite/execute |
Fixing chmod 600 SSH Key Errors ("Permissions Are Too Open")
If ssh -i ~/.ssh/id_rsa user@server fails with WARNING: UNPROTECTED PRIVATE KEY FILE! Permissions 0644 for 'id_rsa' are too open, OpenSSH is intentionally blocking authentication because other local accounts can read your key. Fix both the folder and the key in two lines:
chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_rsa
# Or for read-only AWS EC2 .pem keys:
chmod 400 server-key.pem
Linux Permissions (chmod) Calculator:

Step-by-Step: Generate Safe Server Commands
- Pick a Preset or Toggle Bits: Open the chmod Calculator and click a 1-click server preset (Nginx 755, Static Web Files 644, SSH
~/.ssh700, SSHid_rsa600,wp-config.php600, or AWS.pem400), or type any 3-digit octal value directly. - Enter Your Target Path & Optional
-R: Type your path (e.g.,/var/www/htmlordeploy.sh) and toggle-RRecursive only when applying uniformly to a directory tree. - Check the Live Security Risk Badge: Confirm the badge shows PRODUCTION SAFE (never deploy world-writable
777alerts to a live server). - Copy & Verify With
ls -l: Paste the octal or symbolic command into your terminal and runls -lto verify the exactrwxstring.
Safe Recursive Web Root Permissions (find + chmod)
Avoid running chmod -R 755 /var/www/html blindly across a web root, because it makes every .html, .css, and .jpg file executable. Instead, apply 755 to directories only and 644 to files only:
find /var/www/html -type d -exec chmod 755 {} +
find /var/www/html -type f -exec chmod 644 {} +
Working with encrypted PEM private keys or OpenSSL passphrases on your Linux server too? Check out our Encrypted Private Key Decryptor Guide and Cron Expression Generator Guide.
Frequently Asked Questions (FAQs)
What is the exact difference between chmod 755 and chmod 644?
chmod 755 (rwxr-xr-x) enables the execute (x) bit for Owner, Group, and Others — which Linux requires to cd into directories or run shell scripts. chmod 644 (rw-r--r--) omits the execute bit and is the secure default for static files like HTML, CSS, JavaScript, and images.
Why does chmod 777 fix my permission error but break server security?
777 gives every account on the Linux host read, write, and execute rights, bypassing ownership mistakes at the cost of letting any compromised process overwrite your code or upload web shells. Fix the file owner/group with chown (chown -R www-data:www-data /var/www/html/uploads) instead of opening 777.
Why does SSH reject my private key unless I run chmod 600?
OpenSSH enforces strict file-mode checks on ~/.ssh (700) and private keys like ~/.ssh/id_rsa (600 or 400). If Group or Others have read permission, SSH aborts immediately to protect your private key from other local users.
What permissions should I use for WordPress (wp-config.php, folders, and files)?
Set all WordPress directories to 755, standard PHP/asset files to 644, and wp-config.php to 600 (or 640 if owned by your deploy user and group-readable by www-data).
Does chmod change who owns a file?
No. chmod only changes read, write, and execute permission bits. To change the owning user or group of a file or directory, use chown user:group path.