More
More
Chmod Calculator
Unix file permissions in numbers and letters.
Free. Runs in your browser: nothing you enter or open is uploaded.
| Who | Read | Write | Execute |
|---|---|---|---|
| Owner (u) | |||
| Group (g) | |||
| Others (o) |
The calculator follows the standard Unix and Linux permission model used by chmod, ls -l and FTP clients. It only does arithmetic in your browser; it cannot see or change any file.
How to use it
- Tick the boxes for what the owner, the group and everyone else may do, or type a number such as 755 or letters such as rwxr-xr-x.
- Both forms stay in step, and the plain English line says what the setting allows.
- Copy the chmod command, with your file name, and run it on your server.
Questions
What do the three digits mean?
Each digit is one class: owner, group, then everyone else. Read counts 4, write counts 2 and execute counts 1, and the digit is the sum. So 7 is read, write and execute, 5 is read and execute, and 4 is read only.
What permissions should a website use?
A common safe default is 644 for files and 755 for folders: you can change them, the web server can read them, and nobody else can write. Configuration files holding passwords are often set to 600 or 640. Avoid 777, which lets any user on the server change the file.
What are setuid, setgid and the sticky bit?
They are the optional fourth digit at the front. Setuid (4) runs a program as its owner, setgid (2) runs it as its group or makes new files in a folder inherit the folder group, and the sticky bit (1) on a shared folder such as /tmp stops users deleting each other's files. They show as s, s and t in place of x.
What does a capital S or T mean in ls output?
The special bit is set but the matching execute bit is not. A capital S on a file usually means a mistake, because setuid has no effect on a file that cannot be run.