podman: rootless: permission denied when trying to write to /run/user
/kind bug
Description
When running podman from an unprivileged user (uid=1001(tobwen) gid=1001(tobwen) groups=1001(tobwen)), podman tried to write to /run/user, where the user doesn’t have permission on Debian.
Steps to reproduce the issue:
- no podman-config file exists (I’m using switches only)
- all the dependencies (crun etc.) are installed and the paths are correct
/home/tobwen/podman/usr/local/bin/podman \
--conmon /home/tobwen/podman/usr/local/bin/conmon \
--network-cmd-path /home/tobwen/podman/usr/local/bin/slirp4netns \
--runtime /home/tobwen/podman/usr/local/bin/crun \
--storage-driver overlay \
--storage-opt 'overlay.mount_program=/home/tobwen/podman/usr/local/bin/fuse-overlayfs'
Describe the results you received:
ERRO[0000] could not get runtime: error generating default config from memory: cannot mkdir /run/user/0/libpod: mkdir /run/user/0/libpod: permission denied
Additional information you deem important (e.g. issue happens only occasionally):
Output of podman version:
Error: could not get runtime: error generating default config from memory: cannot mkdir /run/user/0/libpod: mkdir /run/user/0/libpod: permission denied
Output of podman info --debug:
Error: could not get runtime: error generating default config from memory: cannot mkdir /run/user/0/libpod: mkdir /run/user/0/libpod: permission denied
Package info (e.g. output of rpm -q podman or apt list podman):
built from source with a stack, which worked in the past
Additional environment details (AWS, VirtualBox, physical, etc.): Debian 10 on Virtual Box 6 on Windows 10 (all 64-bit)
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16 (10 by maintainers)
I fixed it: Damn you, cgroupfs v2!
doesn’t work
su tobwenworks
su -l tobwenShould we add this to https://github.com/containers/libpod/blob/master/troubleshooting.md ?
Unfortunately we don’t provide an easy way of migrating from one UID to another - the best way is probably to
rm -rf ~/.local/share/containers/and start from scratch.Hi, I cannot find anything in the troubleshooting guide mentioned above for solving this problem. (Error: mkdir /run/user/1001/containers: permission denied).
I’m having the same problem on Ubuntu 18.04. What is the correct solution?
Simply running
loginctl enable-linger $USERfixed this for me.