I am building a server on which my students will be able to upload their projects, which are Python+Flask web-applications. When I add a new user, I add a new service in /etc/systemd/system/[username].service
, that automatically runs the user app.
I would like to allow each user to start, stop and restart his/her own service, but not the services of others. So Alice would be able to do e.g. service Alice restart
and Bob will be able to do service Bob restart
, but not vice-versa.
is this possible?
sudo loginctl enable-linger <username>
– muru Aug 31 '23 at 11:45