chmod 644 — what rw-r--r-- means

644 rw-r--r--

The owner can read and write; the group and others can only read. Nobody can execute it.

Permission breakdown

When to use 644

Common mistakes & gotchas

644 vs the alternatives

Set it with chmod

Apply this permission to a single file:

chmod 644 filename

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

chmod -R 644 directory/

The same thing in symbolic form:

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

Frequently asked questions

What does chmod 644 mean?

chmod 644 sets permissions to rw-r--r--: the owner can read and write; the group and others can read only. No one but the owner can modify the file, and no one can execute it.

Why won't my script run at 644?

644 has no execute (x) bit, so the shell refuses to run it. Add execute with chmod 755 (or chmod +x) so it becomes rwxr-xr-x. 644 is for files you read, not files you run.

Should I use 644 or 755?

Use 644 for plain files that only need to be read (HTML, images, configs). Use 755 for directories and for files that must execute (scripts, binaries). The difference is the execute bit.

Is 644 safe for a config file with passwords?

No. 644 is world-readable, so every user on the machine can read it. Secrets belong at 600 (owner-only) or 640 (owner plus a trusted group). Reserve 644 for non-sensitive files.

Other common permissions

Or build any permission with the interactive chmod calculator.