666
Octal
rw-rw-rw-
Symbolic
Risky
Security
What does chmod 666 mean?
chmod 666 gives read and write for everyone. Anyone can modify the file. Rarely appropriate; device files such as /dev/null use it. For normal files it lets any user — or any compromised process — change the content.
| Who | Digit | Symbolic | Permissions |
|---|---|---|---|
| Owner (user) | 6 | rw- | read, write |
| Group | 6 | rw- | read, write |
| Others | 6 | rw- | read, write |
Each digit is the sum of read (4), write (2) and execute (1). In ls -l the file shows as -rw-rw-rw-.
How to use chmod 666
# one file or directory
chmod 666 filename
# the same permissions in symbolic form
chmod u=rw,g=rw,o=rw filename
# a directory and everything inside it
chmod -R 666 directory/
# only regular files
find path/ -type f -exec chmod 666 {} +
Security warning
World-writable permissions let any local user or compromised process modify the files. If something “only works with 777”, the real problem is usually ownership: run chown so the web server user owns the files, or put both users in a group and use 775 / 664.
Need a different combination? Tick the boxes in the chmod calculator to get the octal and symbolic values instantly.
Chmod calculatorToggle read, write and execute for owner, group and others to build any permission.
Open the calculator Frequently asked questions
What does chmod 666 do?
It sets the permissions to rw-rw-rw-: the owner gets read, write, the group read, write and others read, write.
What is 666 in symbolic notation?
rw-rw-rw-, or chmod u=rw,g=rw,o=rw as a symbolic chmod command.Is chmod 666 safe?
Generally no. 666 lets every user modify the file; prefer a narrower permission.