On Mon, Aug 13, 2018 at 11:51:46AM +0200, Silvio Knizek wrote:
> Am Montag, den 13.08.2018, 11:28 +0200 schrieb Cecil Westerhof:
> > I have a service that is run as a different user as root. But only
> > root can
> > restart the service. Is there a way to make 'systemctl restart' work
> > for
> > the user that runs the service?
> 
> Hi,
> 
> you can either define a sudo-rule or you use policykit (polkit) for
> this. See 
> https://wiki.archlinux.org/index.php/Polkit#Allow_management_of_individual_systemd_units_by_regular_users
>  for an example. Keep in mind that the polkit feature depends on your
> available systemd version.

Or, if the service has Restart= setting, user can kill the MainPID.
-- 
Tomasz Torcz                "Funeral in the morning, IDE hacking
xmpp: zdzich...@chrome.pl    in the afternoon and evening." - Alan Cox

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to