Chmod Calculator

Calculate Unix/Linux file permissions — toggle visually, get octal and symbolic notation, generate the chmod command. 100% client-side.

Octal notation
755
Symbolic notation
rwxr-xr-x
Owner (u)
The user who owns the file
7
Group (g)
Users in the file's group
5
Others (o)
Everyone else
5
Special bits
Only digits 0–7. Digits: 4=read, 2=write, 1=execute.
Generated command
chmod 755 file.txt
Replace "file.txt" with your actual file or directory path.

⚡ Common Presets

📖 Permission Bits Reference

Bit values
  • r (read) = 4
  • w (write) = 2
  • x (execute) = 1
  • Total per class: r+w+x = 7
Common octals
  • 644 = rw-r--r-- (files)
  • 755 = rwxr-xr-x (executables, dirs)
  • 600 = rw------- (private)
  • 700 = rwx------ (private dirs)
  • 1777 = rwxrwxrwt (sticky dir, /tmp)
🔒 100% private: All calculations happen in your browser. Unix/Linux permission model (POSIX).

About Chmod Calculator

Unix and Linux file systems use a permission model with three classes (owner, group, others) and three basic permissions per class (read, write, execute). Permissions can be expressed in octal (755) or symbolic (rwxr-xr-x) notation. Additionally, three special bits — setuid, setgid, and sticky — modify behavior for executables and directories (a fourth leading digit in octal). Getting permissions right is critical for security and functionality: web servers need read access to files, CGI scripts need execute, /tmp needs the sticky bit, and getting it wrong leads to "403 Forbidden" or worse, security vulnerabilities. This calculator lets you toggle each permission visually and shows the equivalent octal, symbolic, and chmod command.

How It Works

  1. Toggle read/write/execute checkboxes for Owner, Group, and Others.
  2. Optionally enable special bits (setuid, setgid, sticky).
  3. See the octal (755) and symbolic (rwxr-xr-x) notations update live.
  4. Copy the generated chmod command (e.g., chmod 755 file.txt).

✨ Key Features

  • ✓Toggle permissions visually (checkbox UI)
  • ✓Octal notation (755)
  • ✓Symbolic notation (rwxr-xr-x)
  • ✓Special bits: setuid (4), setgid (2), sticky (1)
  • ✓Generates exact chmod command
  • ✓Preset buttons for common permissions (644, 755, 600, 700, 777)
  • ✓Live updates as you toggle
  • ✓Copy command with one click
  • ✓Includes reference for common scenarios (web files, private keys, directories)
  • ✓100% client-side — no data sent to any server

🎯 Common Use Cases

  • →Configuring permissions for web files (644) and directories (755)
  • →Setting up SSH keys (private 600, public 644)
  • →Making scripts executable (755)
  • →Setting up shared directories (/tmp is 1777 with sticky bit)
  • →Debugging "Permission denied" errors
  • →Learning Unix permissions by experimenting
  • →Writing deployment scripts that use chmod
  • →Understanding permissions of a file you received

💡 Advanced Tips & Pro Insights

  • ▸Permission bits: read (r) = 4, write (w) = 2, execute (x) = 1. Each class (owner/group/other) sums these values. So 755 = owner rwx (4+2+1), group rx (4+1), other rx (4+1).
  • ▸Common patterns: 644 for files (rw-r--r--), 755 for executable files and directories (rwxr-xr-x), 600 for private files (rw-------), 700 for private directories (rwx------), 777 for fully open (NOT recommended).
  • ▸Directories require execute (x) to enter and read (r) to list contents. A directory with only r but no x cannot be cd'd into. A directory with only x but no r allows access to specific files if the path is known.
  • ▸The sticky bit (1777) on a directory means only the file owner can delete or rename their own files — used for /tmp. Without it, any user with write access could delete anyone else's files.
  • ▸setuid (4XXX) on an executable runs it with the file owner's privileges (e.g., passwd runs as root). setgid (2XXX) does the same for group.
  • ▸The umask determines default permissions for newly created files. Common umask is 022 (files: 644, dirs: 755) or 002 (files: 664, dirs: 775).

Frequently Asked Questions

Is this chmod calculator free?▾
Yes, this chmod calculator is completely free with no signup, email, or usage limits.
Is my data safe?▾
Yes, 100% safe. All calculations happen in your browser. No data is sent to any server.
What do the numbers in chmod 755 mean?▾
7 = owner has read+write+execute (4+2+1). 5 = group has read+execute (4+1). 5 = others have read+execute (4+1). So 755 = rwxr-xr-x.
What permissions should I use for web files?▾
Files: 644 (rw-r--r--). Directories: 755 (rwxr-xr-x). For files that must be writable by the web server (rare — usually avoid), 664 with correct group. Never use 777 — it allows any user to modify files.
Why does SSH reject my private key?▾
SSH requires the private key to have permissions 600 (rw-------). If it is more permissive, SSH refuses to use it. Run chmod 600 ~/.ssh/id_rsa to fix.
What is the sticky bit?▾
The sticky bit (1XXX or preceded by t in symbolic notation) on a directory restricts deletion: only the file owner, directory owner, or root can delete files. This is why /tmp is 1777.
What is setuid?▾
setuid (4XXX) on an executable runs it with the file owner's privileges instead of the caller's. Common for passwd, sudo, ping. A security risk if misused — only root can set it.
What is the difference between chmod and chown?▾
chmod changes permissions (who can read/write/execute). chown changes ownership (which user and group own the file). Both are usually needed when deploying files as root but running them as a web server user.