The permissions calculator

A permission is a number and a string, and the whole skill is moving between the two. These questions check that you can read the fourth digit, tell a capital letter from a lowercase one, and write a mode with the symbolic form.

4 questions 1 task Read the lesson

Questions

Each one is marked as you go, and the explanation arrives straight after, which is the part worth reading.

4 questions, marked as you go.

1 What does the leading 4 in the mode 4755 mean?
2 A file shows the mode -rwSr--r--. What does the capital S tell you?
3 What does chmod u+rwx,go+rx script.sh do?
4 Why is chmod 777 almost always the wrong answer?

Tasks

These need your own device. Run the command in Termux, then paste what it printed. The marking looks at what the output means, so spacing, version numbers and ordering do not matter. If you have not installed anything yet, the lesson covers the setup.

Read a mode with a special bit

The permtool.sh you finished is saved next to you. This hands it 4755, the mode of a setuid program, and asks for both notations plus a description. Paste the whole output.

Run this in Termux On your own device. Nothing on this page executes it. The command runs in your terminal, and this box only reads what you paste back.

bash permtool.sh 4755
Marking your own work Both halves of this are checked in your browser, with no server involved, so nothing stops you from pasting output you did not run. The tasks are written so that the easiest way to pass one is to actually do it and read the result, which is the whole intention.

All sets Read the lesson