[Bug 1187209] podman uses wrong uid when changing user with su
https://bugzilla.suse.com/show_bug.cgi?id=1187209 https://bugzilla.suse.com/show_bug.cgi?id=1187209#c6 --- Comment #6 from Alexandre Vicenzi <alexandre.vicenzi@suse.com> --- This is expected behavior in Podman. Taken from [1]: Podman expects a valid login session for the `rootless+cgroupv2` use-case. Podman execution is expected to fail if the login session is not present. In most cases, podman will figure out a solution on its own but if `XDG_RUNTIME_DIR` is pointing to a path that is not writable execution will most likely fail. Typical scenarios of such cases are seen when users are trying to use Podman with `su - <user> -c '<podman-command>'`, or `sudo -l` and badly configured systemd session. Execute Podman via systemd-run that will first start a systemd login session:
$ sudo systemd-run --machine=username@ --quiet --user --collect --pipe --wait podman run --rm docker.io/library/alpine echo hello
Start an interactive shell in a systemd login session with the command machinectl and then run Podman:
Start a new systemd login session by logging in with ssh and then run Podman:
ssh <username>@localhost
Before invoking Podman command create a valid login session for your rootless user:
loginctl enable-linger <username>
[1]: https://github.com/containers/podman/blob/7e469996b19752e24c69c43c44919ca7b3... -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com