chmod 660 — what rw-rw---- means

660 rw-rw----

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

Permission breakdown

When to use 660

Files shared read-write within a group but hidden from the rest of the system — a database socket, a shared data file, or app state owned by a service group.

Set it with chmod

Apply this permission to a file:

chmod 660 filename

Or apply it recursively to a directory and everything inside it:

chmod -R 660 directory/

Other common permissions

Or build any permission with the interactive chmod calculator.