Step 7 of 8 · lab · 15 min
Wrong file permissions
The app service won't start after moving to a new server. Find where it is denied access and fix the permissions without opening anything extra.
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:
- the
appservice works — it starts without any access denials; appusercan read its config/etc/app/app.conf;- the directory
/var/lib/appbelongs toappuser, andappusercan write to it; - the key
/etc/app/secret.keyis accessible toappuseralone: ownerappuser, mode600.
The tools you need are already installed. There's no internet on this machine.
Lab · on your own
No commands are given in this lab: type them in the terminal yourself. Goals are checked on the machine after every command.
Goals
0 of 6-
appuser can read /etc/app/app.conf — not done yet
-
/var/lib/app is owned by appuser — not done yet
-
appuser can write to /var/lib/app — not done yet
-
/etc/app/secret.key has mode 600 — not done yet
-
appuser can read secret.key — not done yet
-
The app service is active — not done yet
The machine is starting
Hints
0 of 3Lab goals
0 of 6-
appuser can read /etc/app/app.conf — not done yet
-
/var/lib/app is owned by appuser — not done yet
-
appuser can write to /var/lib/app — not done yet
-
/etc/app/secret.key has mode 600 — not done yet
-
appuser can read secret.key — not done yet
-
The app service is active — not done yet
Goals are checked on the machine after every command.