Chmod Calculator
Calculate numeric (octal) and symbolic permissions for Linux/Unix file systems
Examples
Standard executable script (755)
owner: rwx · group: r-x · public: r-xOctal: 755
Symbolic: rwxr-xr-x
Command: chmod 755 filenameOwner can read, write, and execute; group and public can read and execute but not modify. This is the default recommended mode for CLI scripts and CGI binaries.
Read-only data file (644)
owner: rw- · group: r-- · public: r--Octal: 644
Symbolic: rw-r--r--
Command: chmod 644 filenameOnly the owner can write; everyone can read. This is the default mode for config files, static assets, and most files served by a web server.
Private file with no group or public access (600)
owner: rw- · group: --- · public: ---Octal: 600
Symbolic: rw-------
Command: chmod 600 filenameOnly the owner can read or write. Use 600 for private keys, .env files, and any credential that must not leak to other users on a shared host.
Owner-only executable directory (700)
owner: rwx · group: --- · public: ---Octal: 700
Symbolic: rwx------
Command: chmod 700 filenameOnly the owner can list, traverse, or modify the directory. Use 700 for keys-only directories like ~/.ssh when the server has multiple untrusted users.
About this tool
The Chmod Calculator turns the nine read/write/execute bits for owner, group, and public into an octal number, a symbolic string, and a ready-to-run `chmod` command. Each bit maps to a known value — read is 4, write is 2, execute is 1 — and the three values per group are summed to produce a single digit between 0 and 7.
The three quick-start buttons cover the most common server-side scenarios: 777 (world-writable, unsafe), 755 (the standard for executable scripts served by a web server), and 644 (the default for static files and config files). The tool is purely a calculator — it never opens or writes any file.
Everything runs locally in your browser. No path, owner, or permission string is ever uploaded or stored.
How to use
Toggle the bits you want
Tick Read (4), Write (2), or Execute (1) for each of owner, group, and public. The octal and symbolic strings update on every change.
Read the octal and symbolic outputs
The octal field shows the three-digit number (e.g. 755). The symbolic field shows the human-readable version (e.g. rwxr-xr-x) — both are always in sync.
Copy the chmod command
Use the Command row to copy `chmod <octal> filename` into your shell. Replace 'filename' with the actual path before running.
Apply a quick start
Click 777, 755, or 644 to load the most common permission sets, then fine-tune from there.
Use cases
Setting up a public web directory
Apply 755 to directories and 644 to files served by nginx or Apache so the web server can read the content without giving every user write access.
Locking down private keys and .env files
Use 600 for SSH private keys and .env files. SSH refuses to use a key with overly permissive bits, and exposing an .env file to other users is a common breach.
Building a deploy script
Pair the tool with a quick-start of 755 followed by owner-only tweaks to produce the exact chmod line for a deploy script, then paste it into an Ansible or shell role.
Diagnosing a permission error
When a service fails with "Permission denied", paste the current numeric mode into the calculator and toggle the bits you want to match — the symbolic output makes the missing bit obvious.
Common mistakes
Mistake:Setting 777 on a directory to fix a "Permission denied" error.
Fix:777 means everyone can read, write, and execute — including execute on files, which is rarely what you want. Use 755 for executables and 644 for data; reach for 775 only when a specific group needs write access.
Mistake:Confusing the 022 in `umask 022` with the chmod octal.
Fix:umask is a complementary mask in the same octal encoding but with opposite logic — 022 strips group-write and public-write from the defaults new files inherit. Use the Chmod Calculator to compute the resulting mode, not the umask.
Mistake:Using `chmod 600` on a directory expecting it to be traversable.
Fix:Traversing a directory requires the execute bit on every ancestor path. A 600 directory is not even listable by the owner — use 700 (rwx------) for an owner-only directory you still need to enter.
Mistake:Forgetting to set the execute bit on a script before running it.
Fix:Without the execute bit, running `./script.sh` returns "Permission denied". Compute the correct mode (often 755 or 700) here, then re-run `chmod`.
Mistake:Treating the octal field as decimal.
Fix:The octal field is base-8: 10 in octal equals 8 decimal. The calculator emits the canonical octal string the kernel expects — never feed it through an arithmetic tool that would re-interpret it as decimal.
Frequently asked questions
Related guides
References & standards
Related tools
.htaccess Generator
Build an Apache .htaccess — HTTPS redirects, rewrites, error pages, security headers, and basic auth
2D Fluid Dynamics & Particle Physics Sandbox
A physics playground with two engines sharing one canvas. The fluid mode runs a real Eulerian Navier-Stokes solver — semi-Lagrangian advection, explicit diffusion, Jacobi pressure projection and vorticity confinement — that you paint with dye and velocity using mouse or touch. The particle mode is a damped Verlet N-body engine with gravity wells, Coulomb attractors and repulsors, spring links, wall restitution and elastic circle collisions. Particle counts adapt to the device (100k target on WebGL2 desktop, 2k-5k on CPU fallback), and every configuration exports as runnable code: a Matter.js world, a PixiJS ticker setup, or a standalone vanilla Canvas engine.
Algorithm Arena & Data Structure Visualizer
Interactive arena for algorithms and data structures: eight sorting algorithms racing on one seeded input, six pathfinding algorithms walking generated mazes, and BST, AVL, Red-Black, B-tree, heap and trie operations replayed step by step with rotations highlighted. Every run shows the Big-O table and the phase-highlighted reference implementation in four languages, and compared values can be played as pitch (sonification) through the shared audio engine. Everything runs client-side; inputs never leave the browser.
Ansible Playbook Generator
Build an Ansible playbook — hosts, vars, and tasks with modules — as YAML
Apache Config Generator
Build an Apache 2.4 VirtualHost — ServerName, DocumentRoot, Directory, aliases, and optional SSL
AWS Architecture Diagram
Drag-and-drop AWS service blocks, connect edges and export architecture diagrams as SVG