Free tool · Developer tools
Chmod calculator
Tick the permissions or type a number, and see the octal mode, the symbolic form (rwxr-xr-x), who can do what and the ready-to-paste chmod command. Setuid, setgid and sticky bits are included.
- Free
- No sign-up
- Runs in your browser
755rwxr-xr-x for a file
- Owner rwx
- Group r-x
- Others r-x
- Owner (7)
- read, change contents, run it
- Group (5)
- read, run it
- Others (5)
- read, run it
- Symbolic command
- chmod u=rwx,g=rx,o=rx file
- Recursive
- chmod -R 755 file
- umask for new files
- none: new files start without execute
- Execute lets this file be run as a program or script.
How to use the Chmod Calculator
- Tick Read, Write and Execute for Owner, Group and Others, or add Setuid, Setgid and Sticky.
- Or type into Octal mode (for example 644) or Symbolic mode (for example rwxr-xr-x). The boxes and ticks stay in step.
- Enter the File or folder name and say whether it is a File or Directory, because execute means something different for each.
- Press Copy command or Copy symbolic form, or tap one of the Common modes to start from it.
What does chmod 755 mean?
A Unix permission mode has three classes, owner, group and others, and each class gets a number from 0 to 7 that adds up three permissions: read = 4, write = 2 and execute = 1. For 755, the owner has 7 = 4 + 2 + 1 (read, write and execute), the group has 5 = 4 + 1 (read and execute), and others have 5 as well. The symbolic form is rwxr-xr-x, and the command is chmod 755 file. In words: the owner can do everything, everyone else can read and run it but not change it.
The same mode in symbolic style is chmod u=rwx,g=rx,o=rx file. For a directory, the permissions read a little differently: read lets you list the names inside, write lets you add or remove entries, and execute lets you enter (search) the directory, according to the chmod manual. That is why a folder is usually 755 and not 644: without execute nobody can open it. Pick Directory in the tool and the result text changes to match.
How do I convert rwx to a number, and the other way?
Go class by class. Write a 1 for each letter that is present and a 0 for each dash, then read the three as binary: r-x is 101, which is 5; rw- is 110, which is 6. So rw-r--r-- is 6, 4, 4, or 644. To go back, split the number into digits and subtract: a 6 is 4 + 2 (read and write), a 4 is read only. The calculator does both directions and rejects bad input with a message, such as a digit 8 in an octal number or a letter that is not allowed in that position.
A fourth leading digit holds the special bits: 4 for setuid, 2 for setgid and 1 for sticky, added together. Omitted leading digits count as zero, so 755 and 0755 are the same mode. In the symbolic form, setuid shows as s in the owner's execute slot (a capital S if execute is off), setgid shows in the group slot, and the sticky bit shows as t (or T) in the last slot. Mode 4755 is rwsr-xr-x and 1777 is rwxrwxrwt. The first character of an ls -l line is the file type, not a permission; paste all ten characters and the tool drops it for you.
What is the difference between chmod 644 and 755, and is 777 safe?
The only difference between 644 and 755 is execute. 644 lets the owner read and write and everyone else read, which suits a text file, an image or a web page. 755 adds execute for all three, which suits a program, a script or a directory. A script that fails with "permission denied" is often 644 and needs 755 or 700.
777 gives everyone, every user on the machine, permission to read, write and execute. It is rarely the right fix, because any user or program can then change or replace the file. When something will not work, work out which user needs which access and grant only that, for example 775 for a folder shared by a group. The sticky bit is the safer tool for shared writable folders: on a directory it stops users removing or renaming files they do not own, which is how /tmp works, mode 1777.
Mode and umask are related. When a program creates a file, the mode it asks for has the umask bits removed: the system takes the requested mode and clears every bit set in the umask. With the common umask 022, a new file created with 666 ends up 644. In this tool, the line umask for new files shows the umask that would produce your mode from 666: for 644 it is 022, and for a 755 directory the umask for new directories, from 777, is 022.
| Octal | Symbolic | Owner / group / others can | Typical use |
|---|---|---|---|
| 400 | r-------- | read / nothing / nothing | Read-only for the owner: a private key or secret file |
| 440 | r--r----- | read / read / nothing | Owner and group read only |
| 444 | r--r--r-- | read / read / read | Everyone can read, nobody can write |
| 600 | rw------- | read and write / nothing / nothing | Private file the owner can edit |
| 640 | rw-r----- | read and write / read / nothing | Owner edits, group reads |
| 644 | rw-r--r-- | read and write / read / read | Usual web or text file: owner edits, everyone reads |
| 660 | rw-rw---- | read and write / read and write / nothing | Owner and group both edit |
| 664 | rw-rw-r-- | read and write / read and write / read | Group-shared file everyone can read |
| 666 | rw-rw-rw- | read and write / read and write / read and write | Everyone can read and write: avoid |
| 700 | rwx------ | read, write and execute / nothing / nothing | Private directory or script, owner only |
| 750 | rwxr-x--- | read, write and execute / read and execute / nothing | Owner full, group can read and run |
| 755 | rwxr-xr-x | read, write and execute / read and execute / read and execute | Usual program or directory: owner full, others read and run |
| 770 | rwxrwx--- | read, write and execute / read, write and execute / nothing | Owner and group full, others none |
| 775 | rwxrwxr-x | read, write and execute / read, write and execute / read and execute | Shared directory the group can write |
| 777 | rwxrwxrwx | read, write and execute / read, write and execute / read, write and execute | Anyone can do anything: avoid |
| 1755 | rwxr-xr-t | read, write and execute / read and execute / read and execute | 755 plus the sticky bit |
| 2755 | rwxr-sr-x | read, write and execute / read and execute / read and execute | 755 plus setgid |
| 4755 | rwsr-xr-x | read, write and execute / read and execute / read and execute | 755 plus setuid |
| 1777 | rwxrwxrwt | read, write and execute / read, write and execute / read, write and execute | Shared writable directory with sticky bit, like /tmp |
To change a whole tree, chmod -R applies one mode to every file and folder inside, which usually is not what you want, because files and folders need different modes. The tool shows the recursive command next to the single-item one. These commands are for Linux, macOS and other Unix-like systems; Windows file permissions work differently. For the rest of your command-line work, the number base converter turns octal into binary, decimal or hex, and the cron expression generator is useful when you schedule a script you have just made executable.
Use it with
- Number Base Converter: binary, octal, decimal, hex.
- Cron Expression Generator: build and explain cron schedules.
- Base64 Encoder Decoder: encode or decode Base64.
Questions
What does chmod 755 mean?
The owner can read, write and execute (7), while the group and others can read and execute (5 each). It is written rwxr-xr-x. It is the usual mode for programs and directories.
What is the difference between chmod 644 and 755?
Execute. 644 (rw-r--r--) lets the owner read and write and everyone else read. 755 (rwxr-xr-x) adds execute for everyone, so the item can be run or, for a directory, entered.
How do I convert rwx to a number?
Give each class the sum of read 4, write 2 and execute 1. rw- is 6, r-- is 4, so rw-r--r-- is 644. Type rwxr-xr-x into Symbolic mode and the calculator shows 755.
Is chmod 777 safe?
Rarely. It lets every user read, write and execute the item, so anyone can change or replace it. Grant the least access that works, such as 775 for a group folder, or use the sticky bit (1777) for a shared writable directory.
How do I chmod all files in a folder recursively?
Use chmod -R with a mode, for example chmod -R 755 folder. It applies the same mode to files and folders alike, so check whether files and folders need different modes first.
Does the calculator send anything to a server?
No. It is plain arithmetic in your browser, and nothing you type leaves your device.
Sources
How this page was made: the tool's results are computed in your browser by the code on this page, using the sources listed above; the explanations were drafted with AI help and checked against the tool's own output.