FormatterHQ

Chmod Calculator

Tick read, write and execute for owner, group and others, or type 644 or rwxr-xr-x. The octal and symbolic forms stay in sync and you get chmod commands ready to paste.

Loading tool…
Ready.

How to use the Chmod Calculator

  1. Tick read, write and execute for owner, group and others — or pick a preset such as 644, 755 or 600.
  2. Alternatively type an octal mode (755, 0644, 4755) or a symbolic one (rwxr-xr-x, -rw-r--r--) into the matching field.
  3. Add setuid, setgid or sticky if you need a special bit.
  4. Type your path into File or directory (the commands say file until you do) and copy the generated chmod commands.

Chmod calculator for Linux and Unix permissions

Every file on Linux, macOS and other Unix systems has three sets of permissions — for its owner, its group and everyone else — and chmod sets them with either a number like 755 or letters like u=rwx,g=rx,o=rx. This chmod calculator converts between the two. Tick the checkboxes or type a mode, and the octal value, the ls -l style string and ready-to-run commands update together.

How octal permissions work

Each digit is the sum of three values: read = 4, write = 2, execute = 1. So 7 is 4 + 2 + 1 (rwx), 6 is 4 + 2 (rw-), 5 is 4 + 1 (r-x) and 4 is read only. The three digits apply to owner, group and others, in that order. An optional fourth digit in front holds the special bits: setuid = 4, setgid = 2, sticky = 1.

Example: chmod 755

Entering 755 produces:

Octal:      755
Symbolic:   rwxr-xr-x

Owner (u):  read, write, execute
Group (g):  read, execute
Others (o): read, execute

Commands:
  chmod 755 file
  chmod u=rwx,g=rx,o=rx file
  chmod -R 755 directory/   # recursive

It works the other way too: typing rw-r----- gives 640 and the command chmod u=rw,g=r,o= file. You can paste the first column of ls -l output, including the leading - or d.

Common permission values

OctalSymbolicTypical use
644rw-r--r--Regular files, web pages, config files readable by all
755rwxr-xr-xDirectories, scripts and programs
600rw-------Private files such as SSH private keys and .env files
700rwx------Private directories like ~/.ssh
640rw-r-----Files a service group may read but others may not
775rwxrwxr-xShared project directories where the group can write
1777rwxrwxrwtShared temp directories such as /tmp

If you just created a key with the SSH key generator, the private key file should be 600 — SSH refuses keys that other users can read.

Special bits: setuid, setgid and sticky

  • setuid (4xxx) runs an executable with the file owner's privileges. 4755 shows as rwsr-xr-x. The calculator warns you, because a setuid program owned by root is a common attack target.
  • setgid (2xxx) on an executable runs it with the file's group; on a directory, new files inherit the directory's group, which is useful for team folders (2775).
  • Sticky (1xxx) on a directory lets only a file's owner delete or rename it, even when everyone can write to the directory.

A lowercase s or t means the special bit and execute are both set. An uppercase S or T means the special bit is set without execute, which is usually a mistake. The symbolic command carries the special bits too: 2775 gives chmod u=rwx,g=rwxs,o=rx file, and the sticky bit is appended as +t.

Common mistakes

  • chmod 777 to "fix" an error. It makes the file world-writable, so any user or compromised process can change it. The tool flags this. Usually the right fix is correct ownership (chown) plus 755 or 775.
  • Recursive 644 on a directory tree. chmod -R 644 strips execute from directories, and you can no longer enter them. Use chmod -R u=rwX,go=rX — the capital X adds execute only to directories and files that already have it.
  • Leading zero confusion. 0755 and 755 are the same mode; the leading 0 just means no special bits.

Curious how each digit maps to bits? The octal to binary converter shows 7 as 111 and 5 as 101, one bit per permission.

Privacy

The calculator runs entirely in your browser. It never touches your files; it only builds the commands for you to run yourself.

Frequently asked questions

What does chmod 755 mean?
The owner can read, write and execute (7), while the group and everyone else can read and execute (5). It is the usual mode for directories and scripts that others need to run but not modify. In symbolic form it is rwxr-xr-x.
What is the difference between chmod 644 and 755?
Both let the owner write and everyone read. 755 also grants execute to all three classes, which programs need to run and directories need to be entered. Use 644 for ordinary files and 755 for directories and executables.
Is chmod 777 ever safe?
Rarely. It lets every user on the system modify or replace the file, so on a server it is a security risk. If a web app cannot write somewhere, fix the ownership or group and use 775 or 770 instead.
What do the s and t letters in rwsr-xr-x mean?
An s in the owner or group execute position means setuid or setgid is set along with execute. A t in the others position is the sticky bit. Uppercase S or T means the special bit is set but execute is not.
Does chmod work the same on macOS?
Yes. macOS uses the same owner, group and other permission bits and the same octal and symbolic chmod syntax. Some GNU-only options differ, but the modes produced here work on both.

Last updated October 3, 2026

Guides

Related tools

AND Calculator Bitwise AND calculator: apply AND to two numbers in decimal, hex, binary or octal. Bitwise Calculator Calculate AND, OR, XOR, NAND, NOR, XNOR, NOT and bit shifts on decimal, hex, binary or octal numbers. Checksum Calculator Calculate MD5, SHA-1, SHA-256, SHA-512, CRC-32 and more checksums of a file or text at once. CIDR / Subnet Calculator Calculate network, broadcast, netmask, wildcard, host range and host count for any IPv4 or IPv6 CIDR block. Date & Time Calculator Calculate the difference between two dates or add/subtract days, weeks, months and years from a date. NAND Calculator Bitwise NAND calculator: apply NAND to two numbers in decimal, hex, binary or octal. Cron Expression Parser Translate cron expressions into plain English and list the next 10 run times. Supports macros, seconds fields and Quartz syntax. Crontab Generator Build a crontab line from presets or custom fields, with a plain-English explanation and a preview of the next run times. Content Security Policy Evaluator Parse a Content-Security-Policy header and flag risky directives such as unsafe-inline, wildcards, missing object-src and base-uri. cURL to Axios (Node.js) Converter Convert curl commands to Node.js axios requests with params, headers, JSON data, auth, form-data uploads and timeouts. cURL to C# Converter Convert curl commands to C# HttpClient code for .NET with headers, content types, basic auth, multipart and TLS options. cURL to Go Converter Convert curl commands into Go code using net/http — method, headers, JSON or form body, basic auth, timeouts and multipart uploads.