Comment # 6 on bug 1187209 from Alexandre Vicenzi
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:

> $ sudo -i
> # machinectl shell username@
> Connected to the local host. Press ^] three times within 1s to exit session.
> $ podman run --rm docker.io/library/alpine echo hello

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/7e469996b19752e24c69c43c44919ca7b3dee362/troubleshooting.md?plain=1#L939


You are receiving this mail because: