Why rootless podman errors with "ERRO[0000] stat : no such file or directory" ?

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 9
  • podman

Issue

  • Rootless user runs into the following error when running any podman command
$ podman ps
ERRO[0000] stat /run/user/xxxx: no such file or directory

Resolution

  • This error is a result of the runRoot of the user is either missing or removed.
  • Run $ env | grep XDG_RUNTIME_DIRand confirm if the directory is present in the host(XDG_RUNTIME_DIR is an env variable that corresponds to runRoot of the user).
  • If absent, this directory needs to be created and assigned permissions $USER:$USER(where USER is the name of the rootless user) so that necessary permissions are assigned for the runRoot directory.

Root Cause

  • runRoot directory for the user is removed/missing from the host.

Diagnostic Steps

  • runRoot of a user can be found from $podman info| grep runRoot. If this directory is absent/removed, it leads to error since the user is unable to write to this location.
# podman info| grep runRoot
  runRoot: /run/containers/storage

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments