Linux Labs

Users, permissions, and processes / Stage 3 of 13 · step 7 of 8

Wrong file permissions

easy ~15 min
Not running Starting usually ~20 s
Report a problem

Situation

The app service was moved to a new server, and it will not start. The service runs as the appuser account: on start it reads the config /etc/app/app.conf and the key /etc/app/secret.key, and it writes its log to the directory /var/lib/app.

sudo systemctl status app shows what happened to the service: the end of its output holds the last lines of its log (without sudo they are hidden). To restart it, run sudo systemctl restart app.

Task

Make it so that:

  1. the app service works — it starts without any access denials;
  2. appuser can read its config /etc/app/app.conf;
  3. the directory /var/lib/app belongs to appuser, and appuser can write to it;
  4. the key /etc/app/secret.key is accessible to appuser alone: owner appuser, mode 600.

The tools you need are already installed. There's no internet on this machine.

Visible only to you. Saved as you type.

All notes

Lab goals

0 of 6
  • appuser can read /etc/app/app.conf — not checked yet
  • /var/lib/app is owned by appuser — not checked yet
  • appuser can write to /var/lib/app — not checked yet
  • /etc/app/secret.key has mode 600 — not checked yet
  • appuser can read secret.key — not checked yet
  • The app service is active — not checked yet

Hints

0 of 3 open · they open one at a time
Hint 1
Show the solution after 3 failed checks

Leave the lab?

The machine keeps running for 10 more minutes, then it is removed. Files are lost; completed goals stay.

Loading…