Chmod Calculator
Tick the permissions you want and get the octal code, the symbolic notation and a ready-to-run chmod command instantly. Works both ways — type 755 or rwxr-xr-x and the grid updates itself.
- Copy-ready commands
- Security warnings
- setuid, setgid & sticky bit
- umask & recursive helpers
-rwxr-xr-x
chmod 755 /var/www/htmlchmod -R 755 /var/www/htmlchmod u=rwx,g=rx,o=rx /var/www/htmlfind /var/www/html -type d -exec chmod 755 {} \;What this allows
Why use this chmod calculator
Every Linux permissions calculator gives you an octal number. Very few tell you what that number actually permits, hand you the exact command to run, or stop you before you set something world-writable on a production server.
Four commands, one click each
Plain chmod, recursive chmod, symbolic chmod, and the find-based pattern that sets directories and files correctly in one pass. Copy any of them straight into your shell.
It works in both directions
Tick boxes, type 640, or paste rw-r----- from an ls -l listing. All three stay in sync, so you can decode a permission just as easily as build one.
Warns you about 777
World-writable permissions, setuid on writable files and other genuinely dangerous combinations trigger a clear warning explaining the actual risk, not a generic caution.
Plain-English breakdown
A per-role explanation of what owner, group and others can each do, written differently for files and for directories — because execute means two completely different things.
Special bits and umask
Full four-digit support for setuid, setgid and the sticky bit, plus the umask value that would produce your chosen permission by default.
Runs entirely offline
No paths, filenames or server details ever leave your browser. There is no request, no logging and no sign-up.
How to use the chmod calculator
- 1
Set the permissions
Tick read, write and execute for owner, group and others — or hit a preset like 644 or 755 to start from a sensible default.
- 2
Or decode an existing one
Paste the nine characters from
ls -linto the symbolic field, or type the octal number, and the grid fills itself in. - 3
Check the breakdown
Read what each role can actually do and take any warning seriously before applying it to a live server.
- 4
Copy the command
Enter your path, then copy the plain, recursive, symbolic or find-based command depending on what you are changing.
How Linux file permissions work
Every file and directory on a Unix-like system has three permission sets: one for the owner, one for the group, and one for others. Each set holds three flags — read, write and execute — giving nine bits in total.
Run ls -l and you see them as a ten-character string:
Each flag has a numeric value: read is 4, write is 2, execute is 1. Add them together per role and you get one octal digit. rwx is 4+2+1 = 7, r-x is 4+1 = 5, and rw- is 4+2 = 6. Three digits describe the whole file, which is why 755 and 644 are the two numbers you see most often.
Execute means something different on a directory
On a file, execute lets you run it as a program or script. On a directory, execute is what lets you enter it and access things inside — without it, read permission only lets you list names, and you cannot open anything. This is why 644 is right for files but breaks directories, and why folders normally need 755.
Symbolic mode
chmod also accepts symbolic arguments: u owner, g group, o others, a all, combined with + to add, - to remove and = to set exactly. chmod u+x script.sh adds execute for the owner and leaves everything else untouched, which is often safer than resetting the whole mode with a number.
Common permissions and when to use them
| Octal | Symbolic | Typical use |
|---|---|---|
644 | rw-r--r-- | Standard web files: owner edits, everyone reads |
755 | rwxr-xr-x | Directories and executable scripts |
600 | rw------- | Secrets: SSH keys, .env files, config with credentials |
640 | rw-r----- | Config the web server group must read but nobody else |
664 | rw-rw-r-- | Files a team group edits collaboratively |
775 | rwxrwxr-x | Directories a team group writes to |
700 | rwx------ | Private directories, e.g. ~/.ssh |
777 | rwxrwxrwx | Almost never correct on a server |
Why 777 is a bad habit
Setting 777 makes a file writable by every account on the machine, including whatever user a compromised service runs as. On a shared host it can mean other customers. It is the classic quick fix for a permission error, and it converts a small misconfiguration into a way for an attacker to overwrite your code. If something fails to write, the answer is almost always the wrong owner, not permissions that are too tight — fix it with chown instead.
The safe way to fix a whole tree
Running chmod -R 755 across a project makes every file executable, which is untidy and occasionally dangerous. The find pattern applies 755 to directories and 644 to files separately, which is what you almost always actually want:
For WordPress specifically, files at 644, directories at 755 and wp-config.php at 640 or 600 is the standard recommendation.
Permission values at a glance
| Digit | Symbolic | Read | Write | Execute |
|---|---|---|---|---|
0 | --- | No | No | No |
1 | --x | No | No | Yes |
2 | -w- | No | Yes | No |
3 | -wx | No | Yes | Yes |
4 | r-- | Yes | No | No |
5 | r-x | Yes | No | Yes |
6 | rw- | Yes | Yes | No |
7 | rwx | Yes | Yes | Yes |
A fourth digit in front controls the special bits: 4 for setuid (run as the file owner), 2 for setgid (run as the group, or inherit the group on new files in a directory) and 1 for the sticky bit (only the owner can delete their own files, as on /tmp). So 2775 is a shared directory with group inheritance, and 1777 is the classic world-writable temp directory.
Chmod calculator FAQs
What does chmod 755 mean?
755 means the owner can read, write and execute; the group and everyone else can read and execute but not write. In symbolic form it is rwxr-xr-x. It is the standard permission for directories and for scripts that need to be runnable, because directories require execute permission before anyone can enter them.
What does chmod 644 mean?
644 gives the owner read and write, and everyone else read only, shown as rw-r--r--. It is the normal permission for regular web files such as HTML, CSS, images and PHP scripts. PHP files do not need the execute bit because the web server reads them and the interpreter runs them, not the filesystem.
How do I calculate chmod numbers?
Give each permission a value: read 4, write 2, execute 1. Add up what you want for the owner, then the group, then others, and write the three totals side by side. Read plus write is 6, read plus execute is 5, and all three is 7 — so rw-r-xr-- is 654. The calculator above does this in both directions.
Is chmod 777 safe?
No, not on any machine other people can reach. 777 lets every user and every process on the system modify or replace the file, which turns a minor foothold into full control of your code. Permission errors are usually an ownership problem instead — check ls -l and fix the owner with chown before loosening permissions.
What is the difference between chmod and chown?
chmod changes what the owner, group and others are allowed to do. chown changes who the owner and group actually are. If your web server cannot write to an upload folder, the fix is usually chown www-data:www-data on that folder rather than making it writable by everyone.
How do I apply permissions recursively?
The -R flag applies the same mode to everything beneath a path, but that also marks every file executable when you use 755. The safer pattern is two find commands: one setting directories to 755 and one setting files to 644. Both variants are generated above once you enter your path.
What do setuid, setgid and the sticky bit do?
setuid makes an executable run with the permissions of its owner rather than the user running it, and setgid does the same for the group. On a directory, setgid makes new files inherit the directory's group, which is useful for shared project folders. The sticky bit on a shared directory stops users deleting files they do not own, which is how /tmp works. setuid on anything writable is a serious security risk.
What permissions should WordPress files have?
The standard recommendation is 644 for files, 755 for directories, and 640 or 600 for wp-config.php since it holds your database credentials. The uploads directory needs to be writable by the web server user, which is achieved by ownership rather than by setting 777. Avoid any guide that tells you to chmod a WordPress folder to 777.
Get the permission right the first time
Build it in the grid or decode it from ls -l, read what it actually allows, then copy the exact command for your path.