chmod 664 — what rw-rw-r-- means

664 rw-rw-r--

The owner and group can read and write; others can read only.

Note: this grants group or shared write access — fine for team directories, but make sure that is what you intend.

Permission breakdown

When to use 664

Common mistakes & gotchas

664 vs the alternatives

Set it with chmod

Apply this permission to a single file:

chmod 664 filename

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

chmod -R 664 directory/

The same thing in symbolic form:

chmod u=rw,g=rw,o=r filename

Frequently asked questions

What does chmod 664 mean?

chmod 664 sets permissions to rw-rw-r--: the owner and the group can both read and write; others can read only. It is the standard mode for files a team sharing a group edits together.

When should I use 664 instead of 644?

Use 664 when more than one person (in a shared Unix group) needs to edit the same file. Use 644 when only the owner should write. The extra group-write bit is the whole difference.

Is 664 secure?

It is as secure as the group is trusted — every member of the file's group can modify it, and the file is still world-readable. For team-only data that outsiders must not read, use 660 instead.

Why doesn't group write work even though I set 664?

Usually the file's group is wrong — often the owner's personal login group, which no one else belongs to. Run chgrp to set the shared group first; the 664 bits only help once group ownership is correct.

Other common permissions

Or build any permission with the interactive chmod calculator.