chmod calculator
Turn file permissions into numbers and back, and get the command to run.
Permissions
| Read | Write | Run | |
|---|---|---|---|
| Owner | |||
| Group | |||
| Everyone |
Result
| 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. Use it as a chmod calculator for modes such as 755, 644 and 600, or to read a mode you found in a script or an ls -l listing.
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.
Common uses
- Work out the mode for a web server file or folder.
- Read what rwxr-xr-x means in octal.
- Make the command for a private key.
- Make a recursive command with -R for a whole folder.
- Check what group and others can do with a mode.
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.
What does chmod 755 mean?
The owner can read, write and run. The group and others can read and run.
What does chmod 644 mean?
The owner can read and write. The group and others can only read.
How do I read rwxr-xr-x?
It is three groups of three: owner rwx, group r-x, others r-x. That is 755.
What does the sticky bit do?
In a folder, only the owner of a file can delete it.