chmod calculator
Turn file permissions into numbers and back, and get the command to run.
Permissions
Common
| Read | Write | Run | |
|---|---|---|---|
| Owner | |||
| Group | |||
| Everyone |
Result
Commandchmod 644 filechmod u=rw,g=r,o=r file
Who can do what
| Read | Write | Run | |
|---|---|---|---|
| Owner | Yes | Yes | No |
| Group | Yes | No | No |
| Others | Yes | No | No |
Command
What it does
The chmod calculator turns file permissions into the numbers and letters Unix and Linux use. Tick read, write and run for owner, group and others, with setuid, setgid and the sticky bit if you need them, and see the octal form like 755, the symbolic form like rwxr-xr-x and the ready chmod command. Type either form and the boxes follow.
How to use it
- 1Tick the permissions, or type a mode like 644 or rwxr-xr-x.
- 2Check the table of who can do what.
- 3Copy the chmod command.
Questions
What should I use for a normal file?
644 for files and 755 for programs and folders. Use 600 for private keys.
Why is 777 a bad idea?
It lets every user on the machine change the file. Almost nothing needs it.
What are setuid and setgid?
They run a program with the rights of its owner or group. Use them only on programs you trust.
AD320 × 100