Though entry appeared to be sane, every command execution was failing as if there was no entry
[podman@atomic-test ~]$ podman run -dt registry.access.redhat.com/ubi8
Trying to pull registry.access.redhat.com/ubi8:latest...
Getting image source signatures
Checking if image destination supports signatures
Copying blob b4e744f5f131 done
Error: copying system image from manifest list: writing blob: adding layer with blob "sha256:b4e744f5f131fb2db0dd7649806f286ecaa3fcda18dc9a4245d83e902100ccb3": processing tar file(potentially insufficient UIDs or GIDs available in user namespace (requested 0:5 for /usr/bin/write): Check /etc/subuid and /etc/subgid if configured locally and run "podman system migrate": lchown /usr/bin/write: invalid argument): exit status 1
For a non root user, add an extra space in /etc/subuid and /etc/subgid
run any podman commands as the non root user
Describe the results you received
podman run fails as if there is no entry in /etc/subuid example "processing tar file(potentially insufficient UIDs or GIDs available in user namespace (requested 0:5 for /usr/bin/write):"
Describe the results you expected
Handle the extra space after user entry in /etc/subuid/gid more efficiently
Issue Description
Came across a problem where we were not able to identify an extra space that was added to /etc/subuid or /etc/subgid for the user podman.
[podman@atomic-test ~]$ cat /etc/subuid cloud-user:100000:65536 podman:165536:65536 [podman@atomic-test ~]
Though entry appeared to be sane, every command execution was failing as if there was no entry
[podman@atomic-test ~]$ podman run -dt registry.access.redhat.com/ubi8 Trying to pull registry.access.redhat.com/ubi8:latest... Getting image source signatures Checking if image destination supports signatures Copying blob b4e744f5f131 done
Error: copying system image from manifest list: writing blob: adding layer with blob "sha256:b4e744f5f131fb2db0dd7649806f286ecaa3fcda18dc9a4245d83e902100ccb3": processing tar file(potentially insufficient UIDs or GIDs available in user namespace (requested 0:5 for /usr/bin/write): Check /etc/subuid and /etc/subgid if configured locally and run "podman system migrate": lchown /usr/bin/write: invalid argument): exit status 1
The space is visible with tr
[podman@atomic-test ~]$ cat /etc/subuid | tr " " "" | tr "\t" "&" cloud-user:100000:65536 podman:165536:65536
Steps to reproduce the issue
Steps to reproduce the issue
Describe the results you received
podman run fails as if there is no entry in /etc/subuid example "processing tar file(potentially insufficient UIDs or GIDs available in user namespace (requested 0:5 for /usr/bin/write):"
Describe the results you expected
Handle the extra space after user entry in /etc/subuid/gid more efficiently
podman info output
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
No
Additional environment details
podman-4.6.1-7.el9_3.x86_64 on RHEL 9.3
Additional information
Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting