chmod 666 — rw-rw-rw-
What chmod 666 allows, when to use it, and the calculator pre-filled with it — toggle any box to compare.
rw-rw-rw-rw-rw-rw-chmod 666 filenamechmod -R 666 /path/to/dirWhat this means
Owner can read, write. Group can read, write. Others can read, write.
What chmod 666 allows
| Who | Read | Write | Execute |
|---|---|---|---|
| Owner | ✓ | ✓ | — |
| Group | ✓ | ✓ | — |
| Others | ✓ | ✓ | — |
Everyone can read and write, nobody can execute. Typical for device files like /dev/null; for normal files it's as risky as 777 without execute.
Every user on the system can modify this. Prefer giving write access through the owner or a group.
Commands
chmod 666 fileset it on one file or directorychmod u=rw,g=rw,o=rw filethe same thing in symbolic formchmod -R 666 dir/recursively — careful: it applies to files and directories alikels -l filecheck the result: -rw-rw-rw- (a directory shows drw-rw-rw-)On a directory, read lets you list it, write lets you create and delete entries, and execute lets you enter it and open what's inside. That's why directories usually get 755 or 750 while files get 644 or 640.
Frequently asked
What does chmod 666 mean?
Owner: read, write. Group: read, write. Others: read, write. In ls -l it shows as rw-rw-rw-.
What is the symbolic form of chmod 666?
chmod u=rw,g=rw,o=rw file — it sets exactly the same permissions as chmod 666.