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

> Owner can read and write; everyone else can read. Symbolic: `rw-r--r--` · Safe when used as intended.

644 is the standard mode for regular files. The owner can read and write; the group and everyone else can only read. Nobody can execute it.

It's what new files get under the common umask of `022`, and it's the right mode for web content: the web server can read your HTML, CSS and images, but can't modify them.

## Permission by permission

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

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

## Use it for

- Regular files: HTML, CSS, images, documents.
- Config files that contain no secrets.
- Public SSH keys (`id_ed25519.pub`).

## Avoid it for

- Secrets — `.env` files, private keys, credentials. Everyone can read them; use `600` or `640`.
- Scripts that must run directly: use `755`.
- Directories: without execute nobody can enter them; use `755`.

## FAQ

### What does chmod 644 do?

It gives the owner read and write (6), and read only (4) to the group and to everyone else. In ls -l it shows as rw-r--r--.

### 644 or 755 for WordPress files?

644 for files and 755 for directories. wp-config.php should be tighter — 640 or 600 — because it holds database credentials.

### Why does ssh say 'UNPROTECTED PRIVATE KEY FILE' with 644?

Private keys must not be readable by others. Use 600 (or 400) for private keys; 644 is only right for the .pub file.

## Related modes

- [chmod 755](https://www.devkult.com/chmod/755.md): Owner can do everything; group and others can read and execute
- [chmod 600](https://www.devkult.com/chmod/600.md): Only the owner can read and write
- [chmod 640](https://www.devkult.com/chmod/640.md): Owner can read and write; group can read; others have no access
- [chmod 664](https://www.devkult.com/chmod/664.md): Owner and group can read and write; others can read

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