chmod Calculator
Converts between octal, symbolic and checkbox permission views, including setuid and sticky bits.
A checkbox for every permission bit, with the octal, the `ls -l` string and the `chmod` argument updating together. It also applies a symbolic change like `u+x` to what you have, and shows what a umask would leave you with.
Permissions
| Who | Read r | Write w | Execute x | Octal |
|---|---|---|---|---|
| OwnerThe user who owns the file. | 6 | |||
| GroupMembers of the file’s group. | 4 | |||
| Everyone elseEvery other account on the machine. | 4 | |||
| SpecialThe fourth octal digit. | 0 |
chmod argument
u=rw,g=r,o=r
Apply a symbolic change
Result
744
As ls shows it
rwxr--r--
`chmod +x` is a change, not a value: what it produces depends on what was there first.
Through a umask
This mode becomes
644
A new file becomes
644
A new directory becomes
755
A umask removes bits from what a program asks for. A new file is requested as 666 and a new directory as 777, which is why the same umask gives 644 and 755.
What it looks like
-rw-r--r-- 1 you staff 4096 file.txt
A capital S or T in that string means the set-id or sticky bit is on while the execute bit beneath it is off — the bit has no effect, and it is nearly always a typo.
How to use it
Tick the bits, or type the number
Everything is bidirectional: type `755` and the boxes follow; tick a box and the octal and the `ls -l` string change with it.
Say whether it is a directory
It changes what the bits mean. On a directory, execute is permission to enter it and read is permission to list it — a directory with read but not execute is the confusing case the notes will flag.
Try a symbolic change
`chmod +x` is a change rather than a value: what it produces depends on what was there. Type `u+x,go-w` and see the result before you run it.
Check what a umask leaves
A umask removes bits from what a program asks for. The panel shows what a new file and a new directory would end up as under the umask you type.
Common questions
Why does the same umask give 644 and 755?
Because the requests differ, not the mask. A program creates a regular file asking for 666 and a directory asking for 777; `022` removes the group and other write bits from each, leaving 644 and 755. The mask never adds an execute bit that was not requested.
What does a capital S in `ls -l` mean?
That the set-id or sticky bit is on while the execute bit under it is off. The bit then has no effect at all, and it is nearly always a typo — a lowercase `s` is the working combination.
Is 777 ever right?
Almost never, and it is usually a diagnostic rather than a fix — it makes the permission error go away without telling you which bit was actually missing. On a shared machine it also means any account can rewrite the file.
Does this cover ACLs?
No. This is the classic Unix mode only. A `+` at the end of an `ls -l` line means there is a POSIX ACL on top, and that can grant or deny access these nine bits say nothing about — `getfacl` is where to look.
Feed it from
Number Base Converter
Converts between binary, octal, decimal, hexadecimal and any base up to 36, with bitwise views.
JSON Formatter & Validator
Pretty-prints, minifies and validates JSON, pointing at the exact line and column of a syntax error.
YAML Formatter & Validator
Re-indents YAML consistently, validates it, and flags the tab and anchor mistakes that break parsers.
TOML Formatter & Validator
Formats and validates TOML, normalising table ordering and inline-table style.
Next
These accept what this tool produces, so the result can go straight in.
docker run to Compose
Turns a docker run command line into a compose service definition, and converts back the other way.
.env Parser & Converter
Parses a .env file and converts it to JSON, YAML, shell exports, Docker or Kubernetes formats.
.gitignore Generator
Builds a .gitignore by combining language, framework and editor templates, with duplicates merged.
Base64 Encoder & Decoder
Encodes and decodes Base64 and Base64URL for text or files, handling UTF-8 correctly.
curl to Code
Converts a curl command into fetch, axios, Python requests, Go, PHP or PowerShell.
Text Hash
Computes MD5, SHA-1, SHA-256, SHA-384, SHA-512 and CRC-32 of a string, with an uppercase and Base64 output option.