What does chmod do?
On Linux, macOS and other Unix systems, every file and folder has permissions for three groups: the owner, the group and everyone else. Each group can be allowed to read (r), write (w) and execute (x). The chmod command changes these permissions.
Permissions are often written as three octal digits. Read counts 4, write counts 2 and execute counts 1, and you add them for each group. So 7 is 4 + 2 + 1 (everything), 5 is 4 + 1 (read and execute) and 6 is 4 + 2 (read and write). Mode 755 is rwxr-xr-x. A fourth leading digit can add the special setuid, setgid and sticky bits. This tool converts between all these forms.
How to use the Chmod Calculator
- Type a mode such as 755, 4755 or rwxr-xr-x, or pick a common mode from the list.
- Read the octal and symbolic forms.
- Check the table of who can read, write and execute.
- Copy the chmod command.