chmod calculator
Convert Unix file permissions between checkboxes, octal numbers such as 755 and symbols such as rwxr-xr-x, including setuid, setgid and sticky bits.
Loading…
Runs in this page in your browser; nothing is uploaded.
About this tool
Work out Unix and Linux file permissions without memorising the numbers. Use it to turn 755 or 644 into rwxr-xr-x, to read a permission string from ls -l, or to get the chmod command for a script, a web directory or an SSH key.
Tick read, write and execute for the owner, group and others, or type an octal number or a symbolic string, and the other forms update. Setuid, setgid and the sticky bit are supported, and the page gives chmod commands in both octal and u=,g=,o= form, ready to copy. It runs in your browser and nothing is uploaded.
How to use it
- Tick “Read”, “Write” and “Execute” for “Owner”, “Group” and “Others”. The page starts at 755.
- Tick “setuid”, “setgid” or “sticky” if you need a special bit.
- Or type a number into “Octal”, such as 644 or 4755, or a string into “Symbolic”, such as rw-r--r--.
- Enter the “File” name, then select “Copy” next to the chmod command you want.
Common questions
What do the digits in 755 mean?
The three digits are for the owner, the group and others. Each is the sum of read (4), write (2) and execute (1), so 7 is rwx, 5 is r-x and 4 is r--; 755 is rwxr-xr-x and 644 is rw-r--r--.
What is the fourth digit, as in 4755?
A leading digit sets the special bits: 4 is setuid, 2 is setgid and 1 is the sticky bit, added together. The page shows four digits only when one of them is set, for example 1777 for rwxrwxrwt.
What is the difference between s and S, or t and T?
A lower-case s or t means the special bit and execute are both set; an upper-case S or T means the special bit is set without execute. s appears in the owner or group position, t in the others position.
Can I paste a string from ls -l?
Yes. A leading file-type character such as - or d is ignored, so drwxr-xr-x works. Remove any trailing . or + that some systems add after the nine permission characters.
What is the difference between the two commands?
They are two ways to write the same mode: chmod 755 file uses the octal number, and chmod u=rwx,g=rx,o=rx file spells out each class in letters. Type your path into “File” to replace “file” in both.
Related tools
Big number calculator
Add, subtract, multiply and divide integers of any size in binary, octal, decimal or hex, compute a^b mod n, and divide repeatedly until the quotient is 0.
Calculator
Standard, scientific and programmer calculator: exact decimal arithmetic, trigonometry in degrees or radians, and hexadecimal, octal and binary with bitwise operations.
Screen PPI calculator
Work out pixels per inch, dot pitch and aspect ratio from a screen’s resolution and diagonal size.