chmod 604 (rw----r--)

chmod 604 gives the owner read, write permissions, the group none, and everyone else read.

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

Change bits in the chmod calculator →

Breakdown

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

owner 6 = 4 + 2 · group 0 = 0 · others 4 = 4

Commands

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

Applied to a directory

Things to know

Related modes

Frequently asked questions

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