chmod 556 (r-xr-xrw-)

chmod 556 gives the owner read, execute permissions, the group read, execute, and everyone else read, write.

556Octal
-r-xr-xrw-ls -l (file)
u=rx,g=rx,o=rwSymbolic chmod

Change bits in the chmod calculator →

Breakdown

ClassDigitSymbolicReadWriteExecute
Owner (u)5r-x✔—✔
Group (g)5r-x✔—✔
Others (o)6rw-✔✔—

owner 5 = 4 + 1 · group 5 = 4 + 1 · others 6 = 4 + 2

Commands

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

Applied to a directory

Things to know

Related modes

Frequently asked questions

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