chmod 501 (r-x-----x)

chmod 501 gives the owner read, execute permissions, the group none, and everyone else execute.

501Octal
-r-x-----xls -l (file)
u=rx,g=,o=xSymbolic chmod

Change bits in the chmod calculator →

Breakdown

ClassDigitSymbolicReadWriteExecute
Owner (u)5r-x✔—✔
Group (g)0---———
Others (o)1--x——✔

owner 5 = 4 + 1 · group 0 = 0 · others 1 = 1

Commands

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

Applied to a directory

Things to know

Related modes

Frequently asked questions

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