How to calculate chmod permissions
- 1Tick the Read, Write and Execute boxes for Owner, Group and Others. The digit for each row is shown on the right.
- 2Or type an octal mode such as 755 or 0644 into Octal, or paste a string like rwxr-xr-x or a full ls -l mode like -rw-r--r-- into Symbolic.
- 3Add setuid, setgid or the sticky bit if you need them; the octal mode gains a fourth leading digit.
- 4Enter the file or directory name and copy the numeric or symbolic chmod command. Common modes like 644, 755 and 600 are one click away.
How Unix permissions add up
Linux file permissions work the same way as on macOS and other Unix-like systems: every file has three sets of permissions, one for the owner (u), one for the file's group (g) and one for everyone else (o). Each set has three bits. Read is worth 4, write is worth 2 and execute is worth 1, and adding them gives a single digit from 0 to 7. Read plus write is 6, read plus execute is 5, and all three is 7. Put the three digits side by side and you have the octal permissions, so 755 means the owner has 7 (rwx) and group and others have 5 (r-x).
The symbolic form that ls -l prints is the same information spelled out: rwxr-xr-x is 755 and rw-r--r-- is 644. For directories, execute means permission to enter the directory and reach files inside it, and read means permission to list its contents, which is why directories are usually 755 and plain files 644.
An optional fourth digit in front holds the special bits. setuid (4) makes an executable run with its owner's privileges, which is how passwd can update a root-owned file. setgid (2) does the same for the group, and on a directory makes new files inherit the directory's group, which is handy for shared project folders. The sticky bit (1) on a directory, as on /tmp with mode 1777, means only a file's owner can delete or rename it. In ls output these replace the execute slot as s or t, or as S or T when the underlying execute bit is off.
chmod also accepts relative symbolic arguments like g+w or o-r, which change individual bits rather than setting them. As a Unix permissions calculator this tool works in absolute terms, so the symbolic command it shows, like u=rwx,g=rx,o=rx, sets each class exactly and works the same on GNU and BSD chmod.
When developers reach for it
Fixing 'Permission denied'
Work out which bit is missing when a deploy script can't execute, or a web server can't read a file.
Locking down secrets
Set SSH private keys, .pem files and .env files to 600 or 400 so only the owner can read them; ssh refuses keys that are readable by others.
Dockerfiles and CI
Use it as a chmod command generator for the RUN line that makes entrypoint scripts and binaries executable, without guessing at the octal digits.
Shared directories
Combine group write with setgid (2775) so everyone in a team group can work in a directory and new files keep the group.
Frequently asked questions
What does chmod 755 mean?
+
The owner can read, write and execute (7), and the group and everyone else can read and execute (5). It's the usual mode for directories and scripts, shown by ls -l as rwxr-xr-x.
What does chmod 644 mean?
+
The owner can read and write (6), and the group and everyone else can only read (4). It's the standard mode for regular files like HTML, config and source files, shown as rw-r--r--.
Why is chmod 777 a bad idea?
+
It lets every user on the system modify or replace the file, and on a directory lets anyone delete files inside it. It usually hides an ownership problem; fixing the owner with chown and using 755 or 775 is safer.
What permissions should an SSH private key have?
+
600 (rw-------) or 400 (r--------). OpenSSH refuses to use a private key that other users can read, and the ~/.ssh directory itself should be 700.
What do the s and t letters in ls -l mean?
+
s in the owner or group execute slot means setuid or setgid is set; t in the others slot means the sticky bit is set. A capital S or T means the special bit is set but the execute bit underneath it isn't.
How do I convert rwx to octal?
+
Split the string into three groups of three, score each letter (r = 4, w = 2, x = 1, - = 0) and add up each group. rwxr-x--- becomes 7, 5 and 0, so 750. You can also paste the string into Symbolic and read the octal value.
Related tools
SHA-256 Hash Generator
Compute SHA-1, SHA-256, SHA-384, and SHA-512 cryptographic hashes from any text using the Web Crypto API. All processing stays in your browser.
Secret Key Generator
Generate cryptographically-secure keys and tokens for AES-128/192/256, HMAC, JWT, OAuth client secrets, session cookies, CSRF, and Django SECRET_KEY. Standard presets plus fully custom byte sizes — hex, Base64, Base64URL, Base58, or alphanumeric output. Bulk generation up to 100 at once.
Binary, Hex & Decimal Converter
Convert numbers between binary, octal, decimal, and hexadecimal. Real-time conversion with input validation and BigInt precision for large values.
Password Generator
Create strong, secure passwords with customizable length and character sets.