I'd like to start a systemd service using DBus in one of my apps which is run as non-root user
myuser
. For that I need to set up a PolicyKit where I'm using polkit 0.105 and added the following .pkla file to /etc/polkit-1/localauthority/50-local.d
[Test polkit]
Identity=unix-user:myuser
Action=org.freedesktop.systemd1.manage-unit-files;org.freedesktop.systemd1.manage-units
ResultActive=yes
ResultInactive=yes
Hoewever, that somehow didn't help it as I'm still getting the error Permission denied
from DBus when it's runned as myuser
where it works when started by root
.
As I understood polkit so far that's actually the way to set it up.
What wonders me as well is that when executing pkaction
it just returns nothing.
Does polkit
need some further setup? I just installed it via apt-get
on an ubunutu 19.04 box.
Asked by plazmakeks
(191 rep)
Jun 21, 2019, 10:10 AM
Last activity: Jun 14, 2025, 03:06 PM
Last activity: Jun 14, 2025, 03:06 PM