Toolman

chmod 666

chmod 666 is rw-rw-rw-.

What 666 grants

WhoDigitPermissionsAdds up as
Owner6read, write4 + 2 = 6
Group6read, write4 + 2 = 6
Others6read, write4 + 2 = 6

When 666 is the right answer

Everyone can read and write. There is almost no legitimate use for this on a real file — if several accounts need write access, put them in a group and use 660.

The command

chmod 666 filename
chmod -R 666 directory/

Note that nobody has the execute bit here, so this value cannot be used on a directory that anyone needs to enter. On a directory, execute grants traversal rather than the right to run something.

How it is written elsewhere

Octal666
Symbolicrw-rw-rw-
As a file in ls -l-rw-rw-rw-
As a directory in ls -ldrw-rw-rw-
Binary110 110 110
World-writableYes — any user on the system can modify this

Frequently asked questions

What does chmod 666 mean?

It sets owner to read, write, group to read, write, others to read, write. In symbolic notation that is rw-rw-rw-.

How do I apply 666?

Run chmod 666 filename. Add -R to apply it to a directory and everything inside, though be careful: a recursive numeric chmod marks every file the same way, which is rarely correct for a mixed tree of files and directories.

Is 666 safe?

It is world-writable, so any account on the system can modify the contents. That is only appropriate for a shared scratch area, and even then the sticky bit should normally be set as well. For anything else, grant access through a group instead.

What is 666 in symbolic notation?

rw-rw-rw-. Written as ls -l shows it, with a leading file-type character, an ordinary file would appear as -rw-rw-rw- and a directory as drw-rw-rw-.

Other permission values

All permission values · Chmod calculator