[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: shepherd service, unexplained permission errors
From: |
Felix Lechner |
Subject: |
Re: shepherd service, unexplained permission errors |
Date: |
Wed, 28 Jun 2023 13:56:29 -0700 |
Hi Attila,
On Wed, Jun 28, 2023 at 1:27 PM Attila Lendvai <attila@lendvai.name> wrote:
>
> but through Shepherd the daemon fails while starting up due to a permission
> denied error:
>
> i created a user for that daemon, and added dialout as a supplementary group:
>
> (supplementary-groups '("dialout"))
>
> (fork+exec-command
> cmd
> #:log-file "/var/log/zigbee2mqtt.log"
> #:user "zigbee2mqtt"
> #:group "homeaut")))))))
The declaration of Shepherd's fork+exec-command has another optional
parameter for "supplementary-groups" [1] which is passed straight to
exec-command. [2]
With a double negation, the language in the manual is a bit hard to
parse, but the explicit argument may be required in order for the
supplementary group to work the way you expect:
"Likewise, command will be run under the current group, unless the
group keyword argument is present and not false, and
supplementary-groups is not '(). " [3]
Kind regards
Felix
[1]
https://git.savannah.gnu.org/cgit/shepherd.git/tree/modules/shepherd/service.scm#n1569
[2]
https://git.savannah.gnu.org/cgit/shepherd.git/tree/modules/shepherd/service.scm#n1610
[3]
https://www.gnu.org/software/shepherd/manual/shepherd.html#index-exec_002dcommand