chmod Calculator
Tick the Unix permissions you need and get the octal number, the rwx string and the exact chmod command.
Permissions
| Who | Read | Write | Execute |
|---|---|---|---|
| Owner | |||
| Group | |||
| Others |
Special bits
Use 3 or 4 octal digits, 0–7 each — for example 755 or 4755.
Use 9 or 10 characters like -rwxr-xr-- (r, w, x, s, S, t, T or -).
Common modes
What this allows
Commands
How to use the chmod calculator
- Tick read, write and execute for the owner, the group and everyone else — or type an octal number such as 755 straight into the box.
- Add setuid, setgid or the sticky bit if you need them, and switch the type to Directory so the wording matches what execute really means there.
- Copy the ready-made
chmodcommand and run it on your server.
FAQ
Why is 755 so common?
Read is 4, write is 2, execute is 1, and each digit adds them up for owner, group and others. 755 means the owner can do everything (7 = 4+2+1) while everyone else can read and execute (5 = 4+1) — exactly what a script or a web directory needs.
What does execute mean on a directory?
On a directory the execute bit is really a traverse bit: without it you cannot cd into the directory or open files inside it, even if you can list the names with read permission. That is why folders are 755 and plain files are 644.
Should I ever use 777?
Almost never. It lets any user or process on the machine rewrite the file. If an upload directory needs to be writable, give it to the web server user with chown and keep the mode at 755 or 775.