devkult_
tools29converters34

chmod 444

r--r--r--Safe when used as intended

Everyone can read; nobody can write or execute.

444 is read-only for everyone — the owner included. It guards against accidental edits and deletions by scripts and editors, while still letting anyone read the file.

It isn't a lock: the owner (and root) can always chmod it back.

Permission by permission

WhoReadWriteExecuteDigitMeans
owner✓——4read only
group✓——4read only
others✓——4read only
  • In ls -l: -r--r--r-- for a file, dr--r--r-- for a directory.
  • Symbolic form: u=r,g=r,o=r
  • New files get this mode when the umask is 222.

Use it for

  • Reference data and generated files that must not be edited by hand.
  • Published files you want protected from accidental overwrite.

Avoid it for

  • Secrets — everyone can read them. Use 400.
  • Files a tool regenerates: it will fail with 'Permission denied'.

Commands

chmod 444 path

set this mode on a file or directory

chmod u=r,g=r,o=r path

the same, written symbolically

find path -type f -exec chmod 444 {} +

apply it to every file in a tree, leaving the directories alone

stat -c '%a %A %n' path

check the current mode on Linux (macOS: stat -f '%Lp %Sp %N' path)

Try variations

444
-r--r--r--
WhoreadwriteexecuteDigit
owner4
group4
others4

The owner can read only; the group can read only; everyone else can read only.

chmod 444 file
chmod u=r,g=r,o=r file

Read the full guide to chmod 444 →

Frequently asked questions

Can the owner still modify a 444 file?

Not directly — writes fail. But the owner can chmod it back to 644 at any time, so treat 444 as a safety catch, not security.

Related modes