Chmod Calculator
Beta: this tool hasn't been fully reviewed yet. Double-check results before relying on them.
Inputs
A number like 755 or 0644, or letters like rwxr-xr-x
| Read | Write | Execute | |
|---|---|---|---|
| Owner | |||
| Group | |||
| Others |
Results
- chmod number
- —
- ls -l letters
- —
- Symbolic mode
- —
- Command
- —
Your input is too long to share as a link, so the page address no longer includes it.
On Linux, macOS and other Unix systems, every file has read, write and execute permissions for its owner, its group and everyone else. chmod sets them with a 3-digit number, and ls -l shows them as letters. This calculator converts between the two and says in plain words who can do what.
How to use it
- Tick the boxes, or type a number (755) or the letters from ls -l (rwxr-xr-x).
- Read the chmod number, the letters and the symbolic form (u=rwx,g=rx,o=rx).
- Copy the command.
Each digit adds read (4), write (2) and execute (1): 7 = 4 + 2 + 1, 5 = 4 + 1.
Examples: 755 is rwxr-xr-x (scripts and folders). 644 is rw-r–r– (ordinary files). 600 is rw——- (private keys). 1777 is rwxrwxrwt, the sticky /tmp folder.
Questions and answers
What do 755 and 644 mean?
755: the owner can read, write and run the file; everyone else can read and run it. 644: the owner can read and write; everyone else can only read. They’re the usual settings for programs and folders, and for ordinary files.
What are setuid, setgid and the sticky bit?
A fourth digit in front. Setuid (4) runs a program as its owner, setgid (2) as its group, or makes new files in a folder inherit its group. The sticky bit (1) on a folder like /tmp lets people delete only their own files.
Is 777 a good idea?
Rarely. It lets every user on the system change or replace the file. If something doesn’t work, give write access only to the user or group that needs it.
What does execute mean for a folder?
Permission to enter it and reach the files inside. Read lets you list the names; execute lets you open them.
Link with pre-filled values
Add # and these parameters to the end of this page's address to open the tool with values already filled in.
| Parameter | What it sets |
|---|---|
perm | Permissions as a number (755, 0644, 4755) or as letters (rwxr-xr-x). |
Example: https://toolabelle.com/chmod-calculator/#perm=640