Closed Beneter closed 3 years ago
Sorry, I already figured it out myself.
The znapzend
command has a rootExec
parameter itself. If I modify my last listing as following, it is working fine.
znapzend:~$ znapzend --rootExec=sudo --noaction --debug --autoCreation
For the daemon to utilize sudo I needed to create the following environment file /etc/default/znapzend
as mentioned in the systemd service description above:
ZNAPZENDOPTIONS=--rootExec=sudo --autoCreation
I will extend the Readme.md section Running by an unprivileged user in a PR soon. I think it does make sense to close the issue afterwards.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I want to run ZnapZend as an unprivileged user on Debian 9 (Stretch). Unfortunately Debian 9 does only come with ZFS 0.6.5, which does not support delegating ZFS permissions yet (
zfs allow
). Therefore I am trying to use sudo for my purposes.Solution in https://github.com/oetiker/znapzend/issues/408#issuecomment-462837867
This is my
/etc/sudoers.d/znapzend
:And my
/lib/systemd/system/znapzend.service
:When executing
znapzend:~$ sudo zfs list
it seems to work without any password.I created a znap configuration with:
But it seems like ZnapZend is not using sudo:
Am I misinterpreting "rootExec" here? Why isn't it stored as a ZFS attribute?