chmod Calculator

Click permissions or type an octal number. Get the symbolic notation and the exact chmod command — instantly.

Common presets

⚠ Never use 777 in production. It grants full write access to every process on the server — a critical security risk on shared hosting.

How the numbers add up

r Read +4

Can view file contents or list directory

w Write +2

Can modify file or create/delete inside directory

x Execute +1

Can run file as program, or enter directory

Each digit in the octal number = sum of the checked permissions for that group. 7 = 4+2+1 (all three). 6 = 4+2 (read + write). 5 = 4+1 (read + execute).

Pro tips

What shared hosting tutorials skip over.

📁 Directories need execute to be entered

The execute bit on a directory doesn't mean "run" — it means "enter". Without it, even if read is set, you can't cd into it or access files inside. That's why directories are typically 755 and files 644.

🔑 SSH keys must be 400 or 600

~/.ssh/id_rsa must not be readable by others. OpenSSH will refuse to use a private key with permissions looser than 600. Use 400 (read-only by owner) for the tightest security.

🌀 Laravel: 755 everywhere except storage

Most Laravel files should be 644 (files) and 755 (directories). Only storage/ and bootstrap/cache/ need 775 so the www-data user can write logs and compiled views.

👤 www-data vs your deploy user

On Ubuntu, Nginx/Apache run as www-data. If your files are owned by a deploy user, add that user to the www-data group and use 775 on writable directories — safer than changing ownership to www-data entirely.

🔄 Use chmod -R with care

chmod -R 755 . sets 755 on everything — including files that should be 644. Better to run two commands: find . -type d -exec chmod 755 {} + and find . -type f -exec chmod 644 {} +.

🧪 Check current permissions with ls -la

Before changing anything, run ls -la to see current permissions in symbolic form. The string drwxr-xr-x = directory (d) + owner rwx + group r-x + others r-x = 755.

Need full server control?

Shared hosting restricts what you can change. A VPS gives you root access and full permission control.

Compare VPS providers →