chmod 660 (rw-rw----) explained

The owner can read and write; the group can read and write; others have no access.

Octal
660
Symbolic
rw-rw----
ls -l shows
-rw-rw----

Who can do what

Class Read (4) Write (2) Execute (1) On a directory
Owner (u)YesYesNoList the file names, but not open them.
Group (g)YesYesNoList the file names, but not open them.
Others (o)NoNoNoNo access.

When to use chmod 660

Lets the owner and the group read and write, and gives nothing to others.

Good for shared files that hold data others must not read, such as a database file or a socket used by a service group.

Commands

Set the mode with octal digits, or with the equivalent symbolic form:

chmod 660 path/to/file
chmod u=rw,g=rw,o= path/to/file

To apply it to every directory below a folder (and not to the files), combine it with find:

find path/to/folder -type d -exec chmod 660 {} +

chmod -R 660 changes files and directories alike, which is rarely what you want: directories usually need execute, regular files usually should not have it.

Work out any mode in the Chmod Calculator