chmod 444 — what r--r--r-- means

444 r--r--r--

Everyone can read; nobody — not even the owner — can write or execute.

Permission breakdown

When to use 444

Locking a file as read-only for all, such as a reference document or a config you want to protect from accidental edits. The owner must chmod it back to write to it again.

Set it with chmod

Apply this permission to a file:

chmod 444 filename

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

chmod -R 444 directory/

Other common permissions

Or build any permission with the interactive chmod calculator.