• Re: Service to start a go service as none-root

    From Michael Osipov@michaelo@FreeBSD.org to muc.lists.freebsd.ports on Fri Sep 5 21:01:25 2025
    From Newsgroup: muc.lists.freebsd.ports

    Hi Matthias,

    this one is tricky because:
    : ${monitorsolar_user:="gitlab_deploy_solar"}
    : ${monitorsolar_group:="gitlab_deploy_solar"}

    Instruct the RC system to do a "su - ...", and then daemon(8) tries to
    drop privs. It cannot work. I had the same issue with a custom Go
    service here at work. Remove "-u ..." from ${command} and it will work.

    I haven't investigated yet how to have only daemon(8) to drop privs. See
    "man 8 rc.subr" as well. It is documented.

    Michael


    --
    Posted automagically by a mail2news gateway at muc.de e.V.
    Please direct questions, flames, donations, etc. to news-admin@muc.de
    --- Synchronet 3.21a-Linux NewsLink 1.2