chmod 644 (rw-r--r--)
The owner can read and write, and everyone else can read. The default for regular files, like web pages and config files.
rw-r--r--Who can do what
| Read | Write | Execute | |
|---|---|---|---|
| Owner | ✓ | ✓ | – |
| Group | ✓ | – | – |
| Others | ✓ | – | – |
- Owner can read and write.
- Group can read.
- Others can read.
Commands
Set the mode
chmod 644 my-file # same thing in symbolic form: chmod u=rw,g=r,o=r my-file
In ls -l output, a file with this mode shows as -rw-r--r-- and a directory as drw-r--r--.
Try a different mode
| Read | Write | Execute | Special | |
|---|---|---|---|---|
| Owner | ||||
| Group | ||||
| Others |
Octal Symbolic
Command