Chmod calculator (Linux file permissions)
Each chmod digit adds read (4), write (2) and execute (1) for the owner, the group and everyone else, so 755 is rwxr-xr-x and 644 is rw-r--r--. Tick the permissions or type a mode in either form to get the other forms and the exact command.
Octal mode
755
rwxr-xr-x
- Symbolic
- rwxr-xr-x
- Four-digit octal
- 0755
- Command
- chmod 755 file
- Command, symbolic form
- chmod u=rwx,go=rx file
- Owner (u)
- read, write and execute
- Group (g)
- read and execute
- Others (o)
- read and execute
- In binary
- 111 101 101
How do chmod permission numbers work?
Each digit of a chmod mode is a sum: read is 4, write is 2 and execute is 1. The three digits apply, in order, to the file's owner, its group and everyone else, so 7 (4 + 2 + 1) is rwx, 5 (4 + 1) is r-x and 755 is rwxr-xr-x. ls -l prints the same nine permissions as letters, with a dash for each one that is off.
An optional fourth digit in front holds the special bits: setuid is 4, setgid is 2 and the sticky bit is 1. In the letters they take the execute slot: s for setuid or setgid with execute on and S without it, and t or T in the others' slot for the sticky bit. So 4755 is rwsr-xr-x and 1777 is rwxrwxrwt.
On a folder the same letters mean different things: read lets you list what is in it, write lets you create and remove files in it, and execute lets you open the files inside. GNU chmod also keeps a folder's existing setuid and setgid bits when you give a mode like 755; use chmod 00755 or chmod =755 to clear them.
digit = read (4) + write (2) + execute (1) mode = [special] owner group others special = setuid (4) + setgid (2) + sticky (1)
Which chmod mode should I use?
| Octal | Symbolic | Typical use |
|---|---|---|
| 644 | rw-r--r-- | Ordinary files such as web pages, images and config files: the owner edits, everyone reads |
| 600 | rw------- | Private files such as SSH private keys: only the owner reads or writes (ssh ignores a private key others can access) |
| 640 | rw-r----- | Files one group must read and nobody else may see |
| 664 | rw-rw-r-- | Files a team group edits together |
| 400 | r-------- | Secrets the owner reads but should not change by accident |
| 755 | rwxr-xr-x | Folders, and scripts or programs everyone may run but only the owner may change |
| 750 | rwxr-x--- | Folders and programs for the owner and one group only |
| 700 | rwx------ | Private folders such as ~/.ssh, and scripts only the owner runs |
| 775 | rwxrwxr-x | Shared folders where a group adds and removes files |
| 777 | rwxrwxrwx | Almost never right: anyone on the machine can change or replace the contents |
| 1777 | rwxrwxrwt | Shared scratch folders such as /tmp: anyone adds files, only each file's owner deletes them |
| 2755 | rwxr-sr-x | A folder whose new files take the folder's group; only the owner adds files |
| 2775 | rwxrwsr-x | Team folders: the group adds files and every new file takes the folder's group |
| 4755 | rwsr-xr-x | Programs that must run with their owner's rights (setuid); keep these rare |
How to work out a chmod command
- 1Choose how to enter the permissionsTick boxes, type an octal mode such as 755, or type letters such as rwxr-xr-x or u=rwx,go=rx.
- 2Set the permissionsTick read, write and execute for the owner, the group and others, plus any special bit you need, or type the mode in the field.
- 3Name the file or folderType its name so the command is ready to run; names with spaces are quoted for you.
- 4Copy the commandCopy chmod 755 file or its symbolic form into your terminal. The result also spells out who can read, write and execute.
Frequently asked questions
What does chmod 777 do and why is it risky?
What is the difference between chmod 755 and chmod 644?
What do s, S, t and T mean in ls -l permissions?
How do I set 755 on folders and 644 on files in one go?
What does chmod +x do?
Sources
- POSIX.1-2024, chmod utility (octal values 4000 to 0001, symbolic s and t) (checked 20 Oct 2026)
- chmod(1), Linux manual page (numeric modes, X, sticky bit, umask with no ugoa) (checked 20 Oct 2026)
- GNU Coreutils manual, The Structure of File Mode Bits (what read, write and execute mean on folders) (checked 20 Oct 2026)
- GNU Coreutils manual, What information is listed (ls -l letters s, S, t, T and the trailing . or +) (checked 20 Oct 2026)
- GNU Coreutils manual, Directories and the Set-User-ID and Set-Group-ID Bits (checked 20 Oct 2026)
- OpenBSD manual, ssh(1), FILES (permissions for ~/.ssh and private keys) (checked 20 Oct 2026)
Need a custom dev tool for your team?
We build internal tools, dashboards, APIs, and SaaS platforms. If you can describe it, we can ship it.
Built by CountryDevs · No signup · No ads · We count visits, never what you enter