chmod 755 Linux Permissions Calculator

Symbolic: -rwxr-xr-x · Owner full access, group & others read/execute · Standard for directories & scripts

chmod 755 (0755) LOW RISK SSH KEY REJECTED
4-digit: 0755
Dir: drwxr-xr-x
Presets:
Interactive Permission Matrix (3×3 + Special Bits) -rwxr-xr-x
Scope Read (4) Write (2) Execute (1) Digit Sum
Owner (u) 4(r) + 2(w) + 1(x) = 7
Group (g) 4(r) + 1(x) = 5
Others (o) 4(r) + 1(x) = 5
Special Mode Bits (4th Leading Octal Digit) 0 (none)
File / Dir Symbolic
-rwxr-xr-x / drwxr-xr-x
Binary Bitmask
111 101 101
umask Complement
Dir 022 · File 022
umask 022 creates dirs as 755 and files as 644 (files require explicit chmod +x).
Security Audit & Command Builder
Clean Least-Privilege Permission Set: Mode 755 restricts write access to the owner and avoids world-writable or SUID escalation risks.
OpenSSH Audit (SSH KEY REJECTED): OpenSSH rejects private keys with 0755: "Permissions 0755 for 'id_ed25519' are too open. UNPROTECTED PRIVATE KEY FILE!" Run chmod 600 instead.
Apply Permission (Octal & Symbolic)
chmod 755 /var/www/html
Symbolic: chmod u=rwx,g=rx,o=rx /var/www/html
Recursive chmod -R
chmod -R 755 /var/www/html
Safe Recursive Split (Dirs vs Files via find)
find /var/www/html -type d -exec chmod 755 {} +
find /var/www/html -type f -exec chmod 644 {} +
Verify Permissions with stat
stat -c "%a %A %U:%G %n" /var/www/html
macOS/BSD: stat -f "%Op %Sp %Su:%Sg %N" /var/www/html
Side-by-Side Octal Comparison
Open /chmod/644/ →
Property chmod 755 (-rwxr-xr-x) chmod 644 (-rw-r--r--)
Octal (3/4-Digit)755 (0755)644 (0644)
File Symbolic-rwxr-xr-x-rw-r--r--
Directory Symbolicdrwxr-xr-xdrw-r--r--
Owner (u)Read, Write, Execute (7)Read, Write (6)
Group (g)Read, Execute (5)Read (4)
Others (o)Read, Execute (5)Read (4)
Special BitsNoneNone
Binary Bits111 101 101110 100 100
Matching umaskDir: 022 / File: 022Dir: 133 / File: 022
Security RiskLOW RISKLOW RISK
SSH Private KeySSH KEY REJECTEDSSH KEY REJECTED
Common Use CaseUniversal Linux default for public directories (web roots, /usr/local/bin, static asset folders) and executable scripts or compiled binaries runnable by all users.Standard regular files (HTML/CSS/JS web assets, public configs, SSH .pub keys)
chmod 755 · -rwxr-xr-x umask 022 (dir) / 022 (file)
Ctrl+Enter: Copy chmod · 100% Browser-Local
Advertisement
Reserved fixed-height slot (CLS = 0.00) 728×90 320×100 300×50

Why Linux Directories and Executables Standardize on chmod 755

chmod 755 (-rwxr-xr-x) is the default permission mode for directories created under umask 0022 and for system executables in /usr/bin and /usr/local/bin. The owner can read, modify, and execute (or add/delete files inside a directory), while group members and other users can traverse directories, list contents, and execute binaries without being able to alter anything.

Avoid running chmod -R 755 across an entire web root: setting the execute bit on plain HTML, CSS, JSON, or uploaded files is sloppy hygiene and adds unnecessary risk. Keep directories at 755 and regular files at 644 with find /var/www/site -type d -exec chmod 755 {} + && find /var/www/site -type f -exec chmod 644 {} +.

  • Symbolic Mode-rwxr-xr-x (file) · drwxr-xr-x (directory) · Octal 0755
  • Permission BitsOwner: rwx (7) · Group: r-x (5) · Others: r-x (5)
  • Matching umaskumask 0022 (Linux default: 777 - 022 = 755 for directories)
Why do web server directories need chmod 755 while files need chmod 644?

On Linux, a directory execute (+x) bit means "permission to traverse and open files inside", so Nginx/Apache needs 755 on folders. Static files do not need to be executed, so 644 is cleaner and safer.

Is chmod 755 safe for production web servers?

Yes for public directories and CLI scripts when owned by a deploy user separate from the web worker (www-data). For sensitive private folders, tighten to 750 or 700.

Does chmod 755 clear an existing SGID bit on a directory?

No! In GNU chmod, 3-digit chmod 755 preserves an existing SGID bit on directories. Use chmod 00755 or chmod g-s to explicitly clear SGID.