Owner can read. Group can read. Others can read.
| Read | Write | Execute | |
|---|---|---|---|
| Owner | ✓ | – | – |
| Group | ✓ | – | – |
| Others | ✓ | – | – |
Typical use
Read-only files nobody should change.
Good to know
444 (r--r--r--) makes a file read-only for everyone, owner included. It guards files that should never change by accident, such as published release artifacts, checksum lists or a robots.txt you don’t want a CMS to overwrite. Editors such as vim warn before writing, and rm asks for confirmation on a write-protected file unless you pass -f.
It isn’t real protection: the owner can chmod it back at any time, root ignores it, and deleting or renaming depends on the folder’s permissions, not the file’s. For stronger immutability on Linux, chattr +i blocks changes even by root until the flag is removed. On a folder, 444 is unusable: names can be listed, but without x nothing inside can be opened.
Commands
| Set the mode | chmod 444 file |
|---|---|
| The same with letters | chmod u=r,g=r,o=r file |
| A folder and everything in it | chmod -R 444 folder |
| Only the folders inside | find folder -type d -exec chmod 444 {} + |
| How ls -l shows it | -r--r--r-- |