Free chmod Permissions Calculator
Toggle Unix file permissions for owner, group, and other to get the octal value (755), symbolic notation (rwxr-xr-x), and the exact chmod command.
| Read | Write | Execute | Value | |
|---|---|---|---|---|
| Owner | 7 | |||
| Group | 5 | |||
| Other | 5 |
$ chmod 755 filename
Common presets
Common uses
- Correct File Permissions for Web ServersSet the right permissions for web files and folders on Apache/Nginx servers.
- Set SSH Key PermissionsSSH refuses keys with loose permissions. Get the exact chmod for your key files.
- Make Shell Scripts ExecutableGet the chmod command to make a script runnable while keeping it secure.
- Learn Linux File PermissionsUnderstand how octal and symbolic Unix permissions map to read/write/execute.
- File Permissions in Docker ImagesSet correct permissions for files copied into Docker containers.
How It Works
This tool is a hand-written, fully client-side Unix permissions calculator β no libraries, no server. It models each permission as a boolean in a React state matrix and converts between octal, symbolic, and ls -l formats using direct bitwise arithmetic.
- 1Checkbox matrix sets stateEach of the nine read/write/execute checkboxes (owner, group, other) toggles a boolean in a React state object. Special bits β setuid, setgid, and sticky β are tracked separately in a parallel state object.
- 2Bitwise arithmetic computes octalThe octalFor() function sums the active permission values for each group using the fixed weights r=4, w=2, x=1. The three group digits are concatenated, and if any special bit is set, a fourth leading digit (setuid=4, setgid=2, sticky=1) is prepended.
- 3Bidirectional parsing syncs all inputsTyping a 3- or 4-digit octal number triggers parseOctal(), which uses bitwise AND to decompose each digit back into permission booleans and update the checkbox matrix. Pasting an ls -l line triggers parseLsPerms(), which uses a regex to extract the 9-character permission string and decodes special characters like s, S, t, and T for setuid/setgid/sticky.
- 4chmod command is assembled and copiedThe final chmod command is built by string interpolation β octal mode or symbolic mode (u=rwx,g=rx,o=rx form) β with optional -R flag and target filename. Clicking Copy writes the command to the clipboard via navigator.clipboard.writeText(), which runs locally with no network call.
Related Tools
Password Protect PDF
Add a password to a PDF with AES-256 encryption, and optionally turn off printing, copying or editing. Runs in your browser; nothing is uploaded.
Timestamp Converter
Convert Unix timestamps to readable dates and vice versa. Supports UTC and local time, seconds and milliseconds.
Number Base Converter
Convert numbers between binary, octal, decimal, and hexadecimal. See bit-size fit and grouped binary output instantly.