Chmod calculator
Tick the permissions you want for the owner, the group and others, or type an octal number such as 755, and this tool converts between them.
Results
Enter your values to see the result.
About this tool
It shows the octal number, the permissions as letters, the chmod command to run and what each of owner, group and others can do. It also covers the setuid, setgid and sticky bits.
- How it is calculated
- read = 4, write = 2, execute = 1; add them for each of owner, group and others (rwx = 7, r-x = 5, r-- = 4); an extra first digit adds setuid (4), setgid (2) and the sticky bit (1). In the letters, s or t replaces x when that bit is set with execute, and S or T when it is set without it.
- Worked example
- With I have: the permissions I want (tick them); Owner: read: Yes; Owner: write: Yes; Owner: execute: Yes; Group: read: Yes; Group: write: No; Group: execute: Yes; Others: read: Yes; Others: write: No; Others: execute: Yes; Setuid (run as the file owner): No; Setgid (run as the file group): No; Sticky bit: No, the result is: Octal number: 755; Permissions as letters: rwxr-xr-x; Command: chmod 755 filename; Owner: rwx; Group: r-x; Others: r-x.
- Good to know
- Read is 4, write is 2 and execute is 1, and the values are added for each of owner, group and others. A leading fourth digit adds setuid, setgid and the sticky bit. Be careful with write permission for others and with setuid, because they can create security problems.
Frequently asked questions
What does chmod 755 mean?
The owner can read, write and execute, while the group and others can read and execute. It is common for programs and folders.
What is the difference between 644 and 755?
644 gives the owner read and write and everyone else read only, with no execute permission. It is common for ordinary files, while 755 suits programs and folders.
What are setuid and the sticky bit?
Setuid makes a program run as its owner. The sticky bit on a folder lets only the owner of a file delete it, as in shared temporary folders.