chmod calculator
755, rwxr-xr-x and u=rwx,g=rx,o=rx are the same thing. Tick boxes or type either form.
| Read (4) | Write (2) | Execute (1) | Digit | |
|---|---|---|---|---|
| Owner | 7 | |||
| Group | 5 | |||
| Everyone else | 5 |
- Octal
- As ls -l shows it
- Command
Questions
- What does chmod 755 mean?
- The owner can read, write and execute (7 = 4+2+1); the group and everyone else can read and execute (5 = 4+1). It's the usual mode for directories and scripts.
- What does chmod 644 mean?
- The owner can read and write; the group and everyone else can only read. It's the usual mode for ordinary files.
- Why is chmod 777 a bad idea?
- Everyone on the machine can change or replace the file, including any compromised service. Fix the owner (chown) or the group instead.
- What is the fourth digit in chmod 4755?
- The first of four digits sets the special bits: 4 is setuid, 2 is setgid and 1 is the sticky bit. 4755 is rwsr-xr-x.
Practise it on a real machine
Broken systems in your browser. The grader checks the result.