Skip to content

systemd User= directive not supported, why? #9642

Answered by mheon
soinu asked this question in Q&A
Discussion options

You must be logged in to vote

Generally speaking, Podman (when managed by systemd) is run as Type=forking with PID files to inform systemd of the PID of the container (not Podman - Conmon and the container will double-fork to daemonize after being launched, to ensure they survive if the Podman process exits). Unfortunately, this doesn't work when the User directive is specified, as systemd expects all PID files to be owned by root. Podman will not be running as root in this case (because systemd launched it as a different user) and as such systemd will refuse to read the PID file.

We have plans to convert the default for our unit files to Type=sdnotify (code changes are required that haven't made it in yet). Once this…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@soinu
Comment options

@soinu
Comment options

@mheon
Comment options

mheon Mar 7, 2021
Maintainer

Answer selected by soinu
Comment options

You must be logged in to vote
1 reply
@ljrk0
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants