chmod Calculator

Click permission bits to build octal and symbolic modes. Great for 755, 644, and custom masks.

Read (4) Write (2) Execute (1)
Octal
755
Symbolic
rwxr-xr-x
Command
chmod 755 filename

Unix · permissions · chmod

Click read/write/execute bits for owner, group, and others to build octal and symbolic modes. Copy a ready chmod command for common layouts like 755 and 644, including setuid, setgid, and sticky bits.

Octal + symbolic Visual bit matrix Presets 755 / 644 / 600 setuid / setgid / sticky Copy command

How Unix permission bits work

Each file or directory has a mode that controls who can read, write, or execute. Permissions are grouped for owner (user), group, and others. Numeric values add up: read = 4, write = 2, execute = 1. So 7 means rwx (4+2+1), 5 means r-x (4+1), 6 means rw- (4+2).

Three octal digits form the familiar mode: 755 is rwxr-xr-x, 644 is rw-r--r--. An optional leading digit encodes setuid (4), setgid (2), and sticky (1) — for example 4755 for a setuid executable.

How to use this calculator

  1. Toggle the checkboxes for owner/group/other read, write, and execute — or click a preset (755, 644, 600, 777).
  2. Optionally enable setuid, setgid, or sticky.
  3. Set a filename to customize the command line.
  4. Copy the chmod … command into your terminal or deploy script.

Common modes

OctalSymbolicTypical use
755rwxr-xr-xExecutable scripts, public web dirs
644rw-r--r--Normal files, static HTML/CSS
600rw-------Private keys, .env, secrets
700rwx------Private directories / scripts only you run
775rwxrwxr-xShared project dirs (with care)
777rwxrwxrwxAlmost never appropriate on servers

Avoid 777 in production. World-writable files and directories are a common root cause of website defacement and secret leakage. Prefer the tightest mode that still works, and fix ownership (chown) instead of opening bits for everyone.

Directories vs files

On directories, “execute” means permission to traverse into the directory (enter it). “Read” lists names; “write” allows creating/deleting entries (subject to sticky bit on shared dirs like /tmp). A web root might be 755 while files inside are 644.

Special bits (quick guide)

FAQ

Symbolic vs octal — which should I use?

Both are valid. Octal is compact for absolute modes (chmod 644 file). Symbolic is clearer for relative changes (chmod u+x script.sh, chmod go-rwx secret).

Why does my deploy still get permission denied?

Mode is only half the story. Check owning user/group, SELinux/AppArmor, mount options, and that the process user matches what you expect.

Does this run chmod on my machine?

No. It only builds the mode and command string in the browser.

Related tools

Sponsored