Free Chmod Calculator
Convert Unix file permissions between octal (755) and symbolic (rwxr-xr-x), with setuid, setgid, sticky bits, chmod commands and a umask helper.
Loading tool…
How to calculate chmod permissions in octal and symbolic form
Tick permissions or type 755 or rwxr-xr-x to get the octal value, symbolic string, chmod command and a plain explanation.
- Tick the Read, Write and Execute boxes for Owner, Group and Others. Each row shows its digit.
- Add setuid, setgid or the sticky bit if needed. The mode becomes four digits, for example 2775.
- Or type into Octal (644, 0755) or Symbolic (rw-r--r--, drwxr-x---) and the grid follows.
- Enter a file name and tick Recursive if you want chmod -R. Copy the octal or symbolic command.
- Pick a common preset to start from a typical mode, and read the explanation of who can do what.
- Use the umask helper to see which permissions new files and folders will get.
When you need a chmod calculator
Unix-like systems such as Linux, macOS and BSD give every file and directory three sets of permissions: for its owner, for its group and for everyone else. Each set has read, write and execute. You meet these when a web server returns 403 Forbidden, an SSH client refuses a private key because its permissions are too open, a deployment script will not run, or a teammate cannot write into a shared folder.
Documentation and error messages mix two notations. Tutorials say chmod 644, while ls -l prints -rw-r--r--. Translating between them by hand is easy to get wrong, especially with the special bits, so the calculator shows both, explains the result in words and writes the command for you.
Worked example: a shared project folder
Say a team shares a folder and everyone in the developers group should be able to add files, while other users can only look. Tick read, write and execute for Owner and Group, and read and execute for Others. The digits are 7 (4+2+1), 7 and 5, so the mode is 775, shown as rwxrwxr-x. The commands read chmod 775 project and chmod u=rwx,g=rwx,o=rx project.
New files created inside would still belong to each person's own primary group. Tick Setgid and the mode becomes 2775, shown as rwxrwsr-x: the s in the group position means setgid plus execute, and new files inherit the folder's group. Next, the umask helper: with umask 027, new files get 640 (rw-r-----) and new folders 750 (rwxr-x---), because 027 removes write from the group and everything from others. With umask 002 they get 664 and 775, which suits shared group work.
How the numbers work
Each permission is a bit: read is 4, write is 2 and execute is 1. Adding the bits of one set gives a digit from 0 to 7, and three digits give the owner, group and others sets in that order. A fourth leading digit holds the special bits: setuid is 4, setgid is 2 and sticky is 1, so 1777 is a world-writable directory with the sticky bit, the classic mode of /tmp.
In symbolic form, each set is three characters, r, w and x or a dash. Special bits replace the execute character: s or S for setuid and setgid, t or T for sticky. The lower-case letter means execute is also set; the capital means it is not, which usually signals a mistake. The symbolic chmod command uses u, g and o with = to set each set exactly, so u=rwx,g=rx,o= gives 750 no matter what the file had before.
Common mistakes
Reaching for 777 is the classic error. It lets any user or compromised process on the machine change or replace the file. When something cannot write, check which user runs the process and fix ownership with chown or group membership instead.
Running chmod -R 755 on a whole website marks every image and text file as executable, and chmod -R 644 makes directories impossible to enter, because directories need execute to be opened. Set directories and files separately (for example with find and -type d or -type f), or use a capital X in symbolic mode, which adds execute only to directories and files that already have it. Finally, remember that SSH expects private keys at 600 and the .ssh folder at 700, or it may refuse them.
Useful tips and limitations
- Regular files rarely need execute. Use 644 for content and 755 only for directories and scripts.
- If a fix seems to need 777, the real problem is usually ownership: change the owner or group with chown instead.
- Paste the first column of ls -l output, such as drwxr-x---, straight into the Symbolic box; the file type letter is ignored.
- Directories need execute (x) to be entered, and read (r) to list their contents.
Common questions
What does chmod 755 mean?
Owner gets read, write and execute (4+2+1=7); group and others get read and execute (4+1=5). In symbolic form it is rwxr-xr-x, or u=rwx,g=rx,o=rx.
What do s, S, t and T mean in ls -l output?
s replaces x when setuid (owner) or setgid (group) is set together with execute; capital S means the special bit is set without execute. t and T mean the same for the sticky bit in the others position.
Does the Chmod Calculator work for Windows?
Windows uses access control lists instead of Unix permission bits. The commands apply to Linux, macOS, BSD, WSL and other Unix-like systems.
What is the difference between chmod 644 and 664?
Both let the owner read and write and everyone read. 664 also lets members of the file's group write, which is useful for shared work but riskier on multi-user systems.
What does the sticky bit do?
On a shared directory such as /tmp, it lets only a file's owner, the directory owner or root delete or rename that file, even though everyone can create files there.
What does umask 022 mean?
It removes write permission for group and others from new items, so new files get 644 and new directories get 755.
Everything runs in your browser. Nothing you type is uploaded or stored by ToolWorld Online; copy or download what you want to keep before leaving the page.
