[systemd-devel] Best way to limit per-user system-wide units

Samuel Williams space.ship.traveller at gmail.com
Tue Dec 13 12:40:26 UTC 2016


Thanks Andrei, this is something I will explore. Will this work well
if I have targets which have multiple dependencies? i.e. can I just
link the top level target?

On 14 December 2016 at 01:36, Andrei Borzenkov <arvidjaar at gmail.com> wrote:
> 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