Linux
chmod calculator
Click the permissions and see the octal number and the chmod command, or enter a number.
| Read (r) | Write (w) | Execute (x) | |
|---|---|---|---|
| Owner | |||
| Group | |||
| Others |
What does this mean?
Every file on Linux and macOS has permissions for three groups: the owner, the group, and others. Each group has three permissions: read (4), write (2), and execute (1). Add them up for one digit: 7 is everything (4+2+1), 5 is read and execute, 6 is read and write. So 755 means: the owner can do everything, and everyone else can read and execute.
Rarely use 777: that lets everyone do anything, including unwanted programs. For regular files, 644 is common, for folders and programs 755, and for private keys (such as an SSH key) 600.