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

Common mistakes & gotchas

444 vs the alternatives

Set it with chmod

Apply this permission to a single file:

chmod 444 filename

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

chmod -R 444 directory/

The same thing in symbolic form:

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

Frequently asked questions

What does chmod 444 mean?

chmod 444 sets permissions to r--r--r--: the owner, the group, and everyone else can read the file, but no one can write to or execute it. It makes a file read-only for all users.

How do I edit a file that is set to 444?

First restore write permission, e.g. chmod u+w file (or chmod 644 file), make your edit, then optionally set it back to 444. The owner can always change the mode even though the write bit is off.

Does 444 stop a file from being deleted?

No. Deletion and renaming are governed by write permission on the parent directory, not the file's own bits. A 444 file in a writable directory can still be removed. Use chattr +i or restrict the directory for true immutability.

What is the difference between 444 and 644?

644 lets the owner write; 444 removes write for everyone including the owner. Use 444 specifically when you want the file frozen against all modification, not just protected from other users.

Other common permissions

Or build any permission with the interactive chmod calculator.