chmod 404 (r-----r--)

chmod 404 gives the owner read permission, the group none, and everyone else read.

404Octal
-r-----r--ls -l (file)
u=r,g=,o=rSymbolic chmod

Change bits in the chmod calculator →

Breakdown

ClassDigitSymbolicReadWriteExecute
Owner (u)4r--✔——
Group (g)0---———
Others (o)4r--✔——

owner 4 = 4 · group 0 = 0 · others 4 = 4

Commands

chmod 404 file.txt
chmod u=r,g=,o=r file.txt     # same thing, symbolic
chmod -R 404 folder/        # recursive (careful: applies to files and directories)
find folder -type f -exec chmod 404 {} +   # only files

Applied to a directory

Things to know

Related modes

Frequently asked questions

What does chmod 404 mean?
Owner: r--, group: ---, others: r--. In ls -l output a file with this mode shows -r-----r--.
How do I set 404 with umask?
New files start from 666 and directories from 777, minus the umask. For new directories, umask 373 yields 404. For new files, umask 262 yields 404.