chmod 666 (rw-rw-rw-)
Everyone can read and write. Device files like /dev/null use it; on regular files it is almost always a mistake.
rw-rw-rw-Who can do what
| Read | Write | Execute | |
|---|---|---|---|
| Owner | ✓ | ✓ | – |
| Group | ✓ | ✓ | – |
| Others | ✓ | ✓ | – |
- Owner can read and write.
- Group can read and write.
- Others can read and write.
- Warning: anyone on the system can write to this.
Commands
Set the mode
chmod 666 my-file # same thing in symbolic form: chmod u=rw,g=rw,o=rw my-file
In ls -l output, a file with this mode shows as -rw-rw-rw- and a directory as drw-rw-rw-.
Try a different mode
| Read | Write | Execute | Special | |
|---|---|---|---|---|
| Owner | ||||
| Group | ||||
| Others |
Octal Symbolic
Command