chmod 474 (r--rwxr--)

chmod 474 gives the owner read permission, the group read, write, execute, and everyone else read.

474Octal
-r--rwxr--ls -l (file)
u=r,g=rwx,o=rSymbolic chmod

Change bits in the chmod calculator →

Breakdown

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

owner 4 = 4 · group 7 = 4 + 2 + 1 · others 4 = 4

Commands

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

Applied to a directory

Things to know

Related modes

Frequently asked questions

What does chmod 474 mean?
Owner: r--, group: rwx, others: r--. In ls -l output a file with this mode shows -r--rwxr--.
How do I set 474 with umask?
New files start from 666 and directories from 777, minus the umask. For new directories, umask 303 yields 474. New files never get execute bits from umask alone, so add them with chmod.