Last login: Wed 04 Nov 2026 on tty1
Archived edition.
Ten things the page says. Every one of them is on your machine right now — run the command above and check.
This manual page documents the GNU version of chmod. chmod changes the file mode bits of each given file according to mode, which can be either a symbolic representation of changes to make, or an octal number representing the bit pattern for the new mode bits.[man]
like verbose but report only when a change is made.[man]
output a diagnostic for every file processed.[man]
use RFILE's mode instead of specifying MODE values. RFILE is always dereferenced if a symbolic link.[man]
Multiple symbolic modes can be given, separated by commas.[man]
A combination of the letters ugoa controls which users' access to the file will be changed: the user who owns it (u), other users in the file's group (g), other users not in the file's group (o), or all users (a).[man]
If none of these are given, the effect is as if (a) were given, but bits that are set in the umask are not affected.[man]
The operator + causes the selected file mode bits to be added to the existing file mode bits of each file; - causes them to be removed; and = causes them to be added and causes unmentioned bits to be removed except that a directory's unmentioned set user and group ID bits are not affected.[man]
A numeric mode is from one to four octal digits (0-7), derived by adding up the bits with values 4, 2, and 1.[man]
Omitted digits are assumed to be leading zeros.[man]
Change a permission and read it back
The octal form and the symbolic form describe the same bits. Being fluent in both is what the page is for.
These commands write files, so run them in a scratch directory:
$ mkdir -p ~/motd-lab && cd ~/motd-lab
$ echo 'secret' > notes.txt
$ ls -l notes.txt
$ chmod 600 notes.txt
$ ls -l notes.txt
$ chmod u+x,go-r notes.txt
$ stat -c '%A %a %n' notes.txt
WHAT YOU SHOULD SEEThe mode string moves from -rw-r--r-- to -rw------- and then to -rwx------, with stat printing 700 at the end.
Five questions, each one taking a term out of a line above. Ten points for each. Tap hear it to have a question read to you; answering plays the verdict.
QUESTION 1 OF 5
Which term completes this line from the page? “This manual page documents the GNU version of chmod. chmod changes the file mode bits of each given file according to mode, which can be either a symbolic _____ of changes to make, or an octal number representing the bit pattern for the new mode bits.”
From point 1 above.
QUESTION 2 OF 5
Which term completes this line from the page? “output a _____ for every file processed.”
From point 3 above.
QUESTION 3 OF 5
Which term completes this line from the page? “Multiple symbolic modes can be given, _____ by commas.”
From point 5 above.
QUESTION 4 OF 5
Which term completes this line from the page? “If none of these are given, the effect is as if (a) were given, but bits that are set in the umask are not _____.”
From point 7 above.
QUESTION 5 OF 5
Which term completes this line from the page? “A _____ mode is from one to four octal digits (0-7), derived by adding up the bits with values 4, 2, and 1.”
From point 9 above.
Answer all five to bank your points.
Five chapters, three voices. Tap one to jump — the player at the bottom of the screen follows.
Know someone with ten minutes and a terminal? Send them today's page. This is the card that appears when you post it:
The Operator has a dispatch on chmod(1),
and he files them for subscribers only. It is free.
Join the club, or read about
the series.
MOTD is a weekday reading of one manual page already installed on your own
machine. Every statement is quoted from that page or from the GNU info
documentation beside it, and every edition names the command that shows you
the source.
archive ·
the operator ·
about ·
podcast ·
Feline Union