Free Online Chmod / Unix Permission Calculator

Toggle the permission checkboxes below to calculate the matching numeric (e.g. 755) and symbolic (e.g. rwxr-xr-x) chmod values.

Owner



Group



Others



Use in a terminal as: chmod <numeric> filename

Results are provided for informational purposes only and may contain errors. Please verify important information independently. Use of this tool is at your own risk.

What the Chmod Calculator does

The Chmod Calculator turns Unix file permissions into the two notations you need: the three-digit octal number that chmod accepts (such as 755) and the nine-character symbolic string that ls -l prints (such as rwxr-xr-x). Tick the read, write and execute boxes for the owner, the group and everyone else, and both values update immediately.

Each digit is the sum of three bits: read is 4, write is 2 and execute is 1. So 7 means read, write and execute (4+2+1), 5 means read and execute (4+1) and 4 means read only. The first digit belongs to the file's owner, the second to its group and the third to all other users. The page opens on 755, the usual setting for scripts and directories. Everything is calculated in your browser; nothing is sent to a server.

When to use it

  • Making a deploy script executable without giving other users write access.
  • Locking down an SSH private key, which OpenSSH refuses to use unless it is 600 or stricter.
  • Translating a permission string from ls -l output into a number for a Dockerfile or Ansible task.
  • Reviewing a pull request that changes file modes and checking what the new number really allows.

Worked example

Input

Owner: read, write, execute
Group: read, execute
Others: read, execute

Output

755
rwxr-xr-x

Common questions about the Chmod Calculator

What is the difference between 644 and 755?

644 (rw-r--r--) lets the owner read and write and everyone else only read, which suits ordinary files such as HTML or config files. 755 adds the execute bit for everyone, which scripts need to run and directories need so users can enter them.

Why should I avoid chmod 777?

777 gives every user on the machine permission to change or replace the file. On a shared server or a web host that means any compromised process can rewrite your code. Grant write access only to the owner, or to a group that really needs it.

Does the calculator support setuid, setgid and the sticky bit?

No. It covers the nine standard permission bits, which is what the three-digit form describes. The special bits add a fourth leading digit (for example 4755); add it by hand if you need it.

How do I apply the result?

Run chmod 755 file with the number, or chmod -R 755 dir for a whole directory. Be careful with -R: files and directories usually need different modes, so find with -type f and -type d is the safer way to set them separately.

Is this tool free?

Yes, it's free to use. No signup, no email required. Get results on this page.

How do I get my result?

Use the tool on this page. Your result appears here; no email delivery is required.