# chmod 664 — What It Means & When to Use It

> Owner and group can read and write; others can read. Symbolic: `rw-rw-r--` · Use with care.

664 is the shared-file counterpart of 644: the owner and the group can read and write, everyone else can read. It's the default for new files when the umask is `002`, which many distributions use for regular users with per-user groups.

## Permission by permission

| Who | Permissions |
|---|---|
| owner | read and write |
| group | read and write |
| others | read only |

Symbolic chmod argument: `u=rw,g=rw,o=r`

## Use it for

- Files edited by several members of a group.
- Content written by a deploy user and updated by a service in the same group.

## Avoid it for

- Files with secrets — everyone can read them. Use `660` or `640`.
- Scripts that need to run: add execute (`775`).

## FAQ

### 664 vs 644?

Group write. 664 lets group members edit the file; 644 lets only the owner edit.

## Related modes

- [chmod 644](https://www.devkult.com/chmod/644.md): Owner can read and write; everyone else can read
- [chmod 660](https://www.devkult.com/chmod/660.md): Owner and group can read and write; others have no access
- [chmod 775](https://www.devkult.com/chmod/775.md): Owner and group can do everything; others can read and execute
- [chmod 666](https://www.devkult.com/chmod/666.md): Everyone can read and write; nobody can execute

Open the interactive page: https://www.devkult.com/chmod/664