DevPik Logo

Chmod Calculator

Visually calculate Linux file permissions — click read/write/execute for owner, group, and others to get octal (755), symbolic (rwxr-xr-x), and the full chmod command with recursive flag.

Why Use Chmod Calculator?

"Is 750 or 755 the right mode for a web-server directory?" is one of those questions every developer re-Googles every few months. The chmod syntax is compact but the octal math (4+2+1 per role, three roles) is annoying to recompute under deploy pressure. This calculator turns the checkboxes you *actually* want into the exact `chmod` command you'd paste into a terminal, covers the common presets (755, 644, 700, 400), and warns when you pick 777 — which almost always indicates a permission problem that should be fixed somewhere else. It also converts symbolic notation (`rwxr-x---`) back into the numeric form and vice versa, so you can read `ls -l` output without a cheat sheet.

How to Use Chmod Calculator

  1. Click the read, write, and execute checkboxes for owner, group, and others in the permission grid.
  2. Watch the numeric (octal), symbolic, and full chmod command update in real time as you click.
  3. Type a value into the numeric or symbolic input to reverse-calculate the grid.
  4. Click a common preset (755, 644, 700, etc.) for one-click permission sets.
  5. Toggle 'Recursive (-R)' if you need the command to apply to all files inside a directory, then copy the command.

Worked Examples

Web server directory (755)

Input
Owner: rwx • Group: r-x • Others: r-x
Output
Numeric: 755\nSymbolic: rwxr-xr-x\nCommand: chmod 755 /var/www/html

Gives the web user full control and lets Nginx/Apache read. Safe default for public-facing directories.

SSH private key (400)

Input
Owner: r-- • Group: --- • Others: ---
Output
Numeric: 400\nCommand: chmod 400 ~/.ssh/id_ed25519

OpenSSH refuses to use a key whose mode is broader than 400 or 600.

Recursively fix a WordPress uploads folder

Input
Owner: rwx • Group: r-x • Others: r-x • Recursive
Output
chmod -R 755 wp-content/uploads

Recursive flag applies the mode to the directory and every file inside it.

About Chmod Calculator

The Chmod Calculator is a free, instant tool for figuring out Linux and Unix file permissions without having to do octal math in your head. Set read, write, and execute permissions for the file owner, group, and others using a simple click-based grid — the tool instantly shows you the numeric value (like 755 or 644), the symbolic notation (like rwxr-xr-x), and the complete chmod command ready to paste into your terminal. It works bidirectionally: you can also type an octal number or symbolic string to see the breakdown. Common presets cover the permission combinations you actually use in production: 755 for web directories, 644 for regular files, 600 for SSH keys, and a clear warning when you select 777 (which is almost never what you want). Everything runs entirely in your browser — no data is sent to any server.

Troubleshooting & Common Issues

After `chmod -R 755`, scripts no longer execute but files are readable

755 on a regular file sets execute on everyone, which is often too loose. For directories you want 755 (so you can `cd` into them) but for plain files you want 644 (no execute). Use the `X` (capital) symbolic form: `chmod -R u=rwX,g=rX,o=rX dir/` applies execute only to directories.

`chmod 777` didn't fix the "permission denied" error

777 is rarely the answer. The real cause is usually ownership: the web server runs as `www-data` (or `nginx`) but the file belongs to `root`. Run `chown -R www-data:www-data /path` first, then apply a safe mode (755 or 644). On SELinux systems, also check `ls -Z` and `restorecon`.

Symbolic notation `chmod u+x file` behaves differently than expected

`u+x` *adds* execute for the user without changing other bits, while `chmod 755` *replaces* all nine bits. If an existing file is 644 and you run `chmod u+x`, you get 744 — not 755. Use numeric mode when you need a specific permission set; symbolic when you want to toggle one bit.

macOS Finder resets my file permissions

macOS sometimes applies ACLs (access control lists) on top of POSIX permissions, and Finder operations can re-apply them. Run `ls -le file` to see the ACL. Strip ACLs with `chmod -N file`, then set the mode again with `chmod 644 file`.

Frequently Asked Questions

What does chmod 755 mean?

Chmod 755 means the file owner has full read, write, and execute permissions, while the group and all other users have read and execute permissions but cannot modify the file. It's the standard permission set for directories on a web server and for executable scripts that need to be run by anyone but edited only by the owner.

What is the difference between chmod 755 and chmod 777?

Chmod 755 gives the owner full control (rwx) while everyone else can only read and execute (r-x). Chmod 777 gives read, write, and execute access to everyone — the owner, the group, and all other users. 777 is almost never safe on a production server because any user on the system can modify the file.

What does chmod 644 mean?

Chmod 644 means the owner can read and write the file, while the group and others can only read it. This is the standard permission for regular files like HTML, CSS, configuration files, and documents. It prevents accidental modification while still allowing the file to be served or read.

How do I use chmod recursively?

Add the -R flag to apply the command to a directory and everything inside it. For example, 'chmod -R 755 /var/www' sets 755 permissions on the /var/www directory and every file and subdirectory under it. Toggle the 'Recursive (-R)' option in this calculator to include it in the generated command automatically.

What does the numeric value in chmod actually mean?

Each digit of the 3-digit number represents permissions for owner, group, and others — in that order. Each digit is the sum of: 4 (read) + 2 (write) + 1 (execute). So 7 = rwx (4+2+1), 5 = r-x (4+1), 6 = rw- (4+2), and 0 = no access.

What is chmod 400 used for?

Chmod 400 gives read-only access to the file owner and denies all access to the group and others. It's the standard permission for SSH private keys — tools like ssh will refuse to use a key file if its permissions are too open, making 400 the recommended setting.

Does this chmod calculator send my data anywhere?

No. The Chmod Calculator runs 100% in your browser with pure JavaScript. Nothing is sent to any server, so you can use it freely for any filename, command, or permission without privacy concerns.

What's the difference between chmod and chown?

Chmod changes file permissions — what each type of user can do with a file. Chown changes file ownership — which user and group own the file in the first place. You typically set ownership with chown first (e.g., 'chown user:group file'), then set permissions with chmod.

Related Tools

Was this tool helpful?