chmod 660 (rw-rw----)

chmod 660 gives the owner read, write permissions, the group read, write, and everyone else none. Read/write for owner and group, e.g. shared sockets or databases.

660Octal
-rw-rw----ls -l (file)
u=rw,g=rw,o=Symbolic chmod

Change bits in the chmod calculator →

Breakdown

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

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

Commands

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

Applied to a directory

Things to know

Related modes

Frequently asked questions

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