我有一个以非root用户身份运行的程序。从这个程序中,我想通过dbus接口启动systemd服务文件。现在,我总是收到此错误消息:
dbus [1643]:[系统]拒绝发送消息,匹配1条规则; type =“ method_call”,sender =“:1.69”(uid = xxxx pid = xxxx comm =“ / usr / bin / xxxx”)interface =“ org.freedesktop.systemd1.Manager” member =“ StartUnit
我尝试了所有我能想到的dbus策略,但没有成功。
当该进程以root身份运行时,我可以启动服务。
有人知道非root用户通过dbus启动systemd服务需要做什么吗?