Chmod calculator
Enter a number (755), an rwx string or click the permissions together. The calculator explains who may do what and flags risky settings.
The tool could not be loaded. Check your connection and reload the page.
| read (r) | write (w) | execute (x) | |
|---|---|---|---|
| Owner | |||
| Group | |||
| Others |
Result
Watch out for
For example u+x, go-w, a=r, g+s or 750. A missing "who" counts as a (the real chmod then also applies the umask).
How it works
Every file has three permission groups: owner, group and others. Each group has read (r = 4), write (w = 2) and execute (x = 1). Their sum is one digit, so 755 means rwx for the owner and r-x for everyone else.
On a directory, r lists the contents, w creates and deletes files in it and x lets you enter it. A directory with r but no x can be listed, but the files in it cannot be opened.
An optional fourth digit in front holds the special bits: setuid (4) runs a program with the owner's rights, setgid (2) on a directory passes its group to new files, and sticky (1) on a directory like /tmp lets people delete only their own files.
The umask decides which permissions new files get: 666 and 777 minus the umask bits. The usual umask 022 gives files 644 and directories 755.
When it helps
- You deploy a website and the server says "Permission denied" when writing cache or logs.
- SSH refuses a key with "UNPROTECTED PRIVATE KEY FILE".
- You want to know exactly what a command from a tutorial does, such as chmod -R g+w.
- You are learning Linux and want to picture the permissions.
Frequently asked questions
// 01 Why is chmod 777 a bad idea?
Anyone on the server can then overwrite the file, including a script an attacker uploads through a vulnerable plugin. Fix permission problems with the right owner or group (chown, chgrp) and 775 or 755.
// 02 Which permissions should a PHP site (Laravel, WordPress) have?
Files 644, directories 755. Directories the site writes to (storage and bootstrap/cache in Laravel, wp-content/uploads) belong to the web server user or group, or use 775. Config files with passwords (.env, wp-config.php) get 640 or 600.
// 03 Which permissions does an SSH key need?
The private key 600, the ~/.ssh directory 700, authorized_keys 600. With looser permissions OpenSSH refuses the key.
You may also need
Did this save you time?
The tools and simulations are free, ad-free and need no sign-up. If they helped you, you can send a contribution for coffee and new tools.
Donate via PayPalWhat happens to your data
Privacy policy (in Czech)- The tools process your input with JavaScript on your device. Nothing you paste is sent to the server, stored or logged.
- The exception is the SPF/DKIM/DMARC check: it asks public DNS (Cloudflare, Google as a fallback) directly from your browser. Only the domain name is sent.
- Analytics (only if you accept analytics cookies) records anonymous events such as "a tool was opened". Never your input or results.
- No ads or advertising scripts run on the tool and simulation pages.
Need a hand?
I build and maintain web applications in Laravel and PHP. If something on these pages is giving you trouble in a project, get in touch.
Get in touch