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

The default for ordinary files — HTML, images, config that should be world-readable, source files served by a web server. The owner edits, everyone else reads.

Set it with chmod

Apply this permission to a file:

chmod 644 filename

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

chmod -R 644 directory/

Other common permissions

Or build any permission with the interactive chmod calculator.