Guides हि
Bramhify Pro

Unlock advanced tools, unlimited usage, and priority support.

Upgrade Now
Article · (Updated: Nov 18, 2026) · 7 min read

Linux chmod 755 vs 644 & 600 Explained (Live Guide)

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 ClassSymbolMeaning
Owner (user)uThe account that owns the file or folder
GroupgOther Linux accounts belonging to the file's assigned group (e.g., www-data)
Others (public)oEvery other user or process on the system

Each class sums three permission bits:

PermissionSymbolOctal ValueOn a FileOn a Directory
Readr4View file contentsList directory contents (ls)
Writew2Edit or overwrite fileCreate, rename, or delete files inside
Executex1Run as a script or binaryEnter / 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)

OctalSymbolic (ls -l)Owner / Group / OthersSecurity LevelExact Production Use Case
755drwxr-xr-xrwx / r-x / r-xSafeNginx/Apache web directories (/var/www/html), executable scripts (.sh)
644-rw-r--r--rw- / r-- / r--SafeStatic web files (index.html, CSS, JS, images), public config files
700drwx------rwx / --- / ---HardenedPrivate folders like ~/.ssh (required by OpenSSH)
600-rw-------rw- / --- / ---HardenedSSH private keys (~/.ssh/id_rsa), .env, WordPress wp-config.php
400-r--------r-- / --- / ---HardenedRead-only AWS EC2 .pem keys (prevents accidental edits)
777-rwxrwxrwxrwx / rwx / rwxDangerousWorld-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:

Bramhify chmod Calculator tool in action Bramhify chmod Calculator tool in action
Generate verified chmod commands with target path, -R recursive flag, security risk badges, and 1-click SSH/Nginx presets.
Linux Permissions (chmod) Calculator 100% Private, Risk Badges & Server Presets

Step-by-Step: Generate Safe Server Commands

  1. Pick a Preset or Toggle Bits: Open the chmod Calculator and click a 1-click server preset (Nginx 755, Static Web Files 644, SSH ~/.ssh 700, SSH id_rsa 600, wp-config.php 600, or AWS .pem 400), or type any 3-digit octal value directly.
  2. Enter Your Target Path & Optional -R: Type your path (e.g., /var/www/html or deploy.sh) and toggle -R Recursive only when applying uniformly to a directory tree.
  3. Check the Live Security Risk Badge: Confirm the badge shows PRODUCTION SAFE (never deploy world-writable 777 alerts to a live server).
  4. Copy & Verify With ls -l: Paste the octal or symbolic command into your terminal and run ls -l to verify the exact rwx string.

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.

Developer & Data Workflows

More Essential Guides in this Series

Practical developer utilities — JSON formatting, regex testing, diff comparisons, cron syntax, and data conversions.

Try it yourself

Generate chmod commands with path, -R flag, risk badges & SSH/Nginx presets.

Open Linux Permissions (chmod) Calculator →