chmod 661 (rw-rw---x)

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

661Octal
-rw-rw---xls -l (file)
u=rw,g=rw,o=xSymbolic chmod

Change bits in the chmod calculator →

Breakdown

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

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

Commands

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

Applied to a directory

Things to know

Related modes

Frequently asked questions

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