Chmod Calculator
Tick read, write and execute to get the octal (755) and symbolic (rwxr-xr-x) Linux permissions and the command
Loading the tool…
Tick read, write and execute for the owner, the group and others to get the octal mode (755), the symbolic mode (rwxr-xr-x) and the chmod command. Use it to set file permissions on a server or to read ls -l output.
How to use
- Tick boxes under "Tick the permissions", or type a value under "Type an octal mode" or "Type a symbolic mode". All three stay in step.
- Enter a change such as u+x or go-w under "Apply a symbolic change" and press "Apply".
- Enter the "File or folder name", switch on -R if needed, and copy the "Command".
- Paste lines into "Read an ls -l line" to see the mode, owner and name of each line.
How it works
- Each octal digit is read 4 + write 2 + execute 1, in the order owner, group, others. In a 4-digit mode the first digit is setuid 4 + setgid 2 + sticky bit 1.
- Enter a "umask value" to see the mode of new files (666 minus what the umask blocks) and new folders (777 minus what the umask blocks).
- On a folder, x means entering it (cd), so a folder without x cannot be entered even with r. The table at the bottom of the page explains this and the common values.
Questions and answers
- What is the difference between chmod 755 and 644?
- 755 (rwxr-xr-x) lets the owner do everything and others read and run; it is common for folders and scripts. 644 (rw-r--r--) lets only the owner write and others read; it is common for files.
- Is it safe to use chmod 777?
- It lets anyone read, write and run the file, which is rarely needed and risky. If 755 or 644 does not work, first check the owner and group (chown).
- How do I set folders to 755 and files to 644 at once?
- -R gives files and folders the same mode, so use the two find commands shown at the bottom of the page.
- What permissions does umask 022 give?
- 022 blocks write for the group and others, so new files get 644 and new folders get 755. A umask switches bits off rather than subtracting numbers: with 033, new files still get 644.