chmod 666 (rw-rw-rw-)

chmod 666 gives the owner read, write permissions, the group read, write, and everyone else read, write. Read/write for everyone, typical for device files like /dev/null.

666Octal
-rw-rw-rw-ls -l (file)
u=rw,g=rw,o=rwSymbolic chmod

Change bits in the chmod calculator →

Breakdown

ClassDigitSymbolicReadWriteExecute
Owner (u)6rw-✔✔—
Group (g)6rw-✔✔—
Others (o)6rw-✔✔—

owner 6 = 4 + 2 · group 6 = 4 + 2 · others 6 = 4 + 2

Commands

chmod 666 file.txt
chmod u=rw,g=rw,o=rw file.txt     # same thing, symbolic
chmod -R 666 folder/        # recursive (careful: applies to files and directories)
find folder -type f -exec chmod 666 {} +   # only files

Applied to a directory

Things to know

Related modes

Frequently asked questions

What does chmod 666 mean?
Owner: rw-, group: rw-, others: rw-. In ls -l output a file with this mode shows -rw-rw-rw-.
How do I set 666 with umask?
New files start from 666 and directories from 777, minus the umask. For new directories, umask 111 yields 666. For new files, umask 000 yields 666.