[systemd-devel] Best way to limit per-user system-wide units
Andrei Borzenkov
arvidjaar at gmail.com
Tue Dec 13 12:36:09 UTC 2016
On Tue, Dec 13, 2016 at 3:23 PM, Samuel Williams
<space.ship.traveller at gmail.com> wrote:
> I'd like my http user to be able to install unit files and start/stop them.
>
> Starting and stopping them is fairly easy with a sudo rule..
>
> But adding them is a bit trickier. I could also use sudo but it seems
> fairly specific.
>
> Is there some way to add a new directory, e.g.
> /etc/systemd/system/http which has permissions specific for http user?
>
> I can install targets/services/etc into that directory and then use
> sudo systemctl start/stop
>
> Thanks for any ideas or suggestions. Alternative ways to achieve the
> same thing also welcome.
>
You can use "systemctl link /path/to/unit/file", this probably is more
friendly for sudo pattern to match only specific /path/to/unit/
directory.
More information about the systemd-devel
mailing list