What it does
Every file on Linux, macOS and other Unix systems has a permission mode: who may read it, change it or run it. The chmod command sets that mode, and it can be written as a number such as 755 or as letters such as rwxr-xr-x. This chmod calculator links the checkboxes, the octal number, the symbolic text and the command, so changing any one updates the rest.
It also shows the special bits (setuid, setgid and sticky), explains in plain words what the mode allows, and has a umask helper for the default permissions of new files. Nothing you type leaves your browser. If you manage a server you may also need cron explainer for scheduled jobs, robots txt for crawlers, and subnet calculator for networks.
How to use it
- Tick the boxes for the owner, the group and everyone else, or press a common mode such as 644 or 755.
- Or type the octal number or the nine-letter symbolic form; the boxes follow.
- Choose File or Folder, type the name and read the chmod commands. Copy command copies the numeric one.
- In the umask box type your umask to see the default permissions, or type the folder permissions you want to get the umask.
What each setting does
- Read, write, execute: 4, 2 and 1 added up per person: 7 is all three, 6 is read and write, 5 is read and run.
- Setuid: a program runs with its owner’s rights (4000, shown as s in the owner’s execute spot).
- Setgid: a program runs with its group’s rights, or new files in a folder join its group (2000).
- Sticky: in a shared folder like /tmp only a file’s owner can delete it (1000, shown as t).
- -R: apply the change to everything inside a folder.
Worked example
The classic web file mode 644 is rw-r—r—: the owner reads and writes (4+2 = 6), the group and everyone else only read (4). A program or folder at 755 is rwxr-xr-x. Adding setuid gives 4755, shown rwsr-xr-x. A umask of 022 removes write from group and others, so new files get 666 - 022 = 644 and new folders 777 - 022 = 755.
FAQs
Is 777 safe? Almost never. It lets every user on the system change or replace the file. Use 755 for programs and folders, 644 for ordinary files.
What does a capital S or T mean? The special bit is on but the execute bit underneath is off.
Why does a folder need execute? To open it and reach what is inside, a folder needs the x permission.
Where the numbers come from
- Mode bits and chmod syntax: POSIX chmod and the GNU coreutils/Linux man page chmod(1) (man7.org and pubs.opengroup.org, checked 2026-12-05). Read = 4, write = 2, execute = 1; setuid = 4000, setgid = 2000, sticky = 1000. Check the official source for your system.
- umask: new files start at 666 and new folders at 777, then the umask's bits are removed (umask(2) and bash(1) manuals). Behaviour of the special bits on folders and files differs a little between Linux, BSD and macOS.
Standard scientific values, such as constants, atomic weights and melting points, are facts found in every textbook; we name where ours were checked. If you are an author or publisher and want a value, a credit or a table changed or removed, tell us and we will act quickly.
Last updated 2026-12-05.