Issue Description
Running rootless Podman inside a rootless Podman container on WSL fails because the default user's SUB_UID and SUB_GID ranges inside the machine are too short.
Steps to reproduce the issue
-
On Windows, start Podman:
-
Open a Debian container without root:
podman run -it debian bash
-
Inside the container:
useradd -m testuser
apt-get install -y podman
su - testuser
podman images
Describe the results you received
Running podman images as the non-root user fails with:
ERRO[0000] running `/usr/bin/newuidmap 52258 0 1000 1 1 100000 65536`: newuidmap: write to uid_map failed: Operation not permitted
Error: cannot set up namespace using "/usr/bin/newuidmap": exit status 1
Running with sudo works:
Describe the results you expected
Cause
The default user inside the Podman machine has limited sub-ID ranges:
$ cat /etc/subuid /etc/subgid
user:100000:65536
user:100000:65536
Meanwhile, inside the container, the ID mappings are:
$ cat /proc/self/uid_map
0 1000 1
1 100000 65536
Same for /proc/self/gid_map.
This is because the user SUB_UID/SUB_GID ranges (100000–165535) are smaller than the mapped range (100000:), nested rootless Podman cannot allocate sufficient IDs, causing namespace setup to fail.
Workaround
Manually increasing the user’s sub-ID range inside the Podman machine by editing /etc/subuids and /etc/subgids, then restarting the machine, solves the issue.
podman info output
Podman in a container
Yes
Privileged Or Rootless
Rootless
Upstream Latest Release
Yes
Additional environment details
WSL on Windows
Additional information
No response
Issue Description
Running rootless Podman inside a rootless Podman container on WSL fails because the default user's
SUB_UIDandSUB_GIDranges inside the machine are too short.Steps to reproduce the issue
On Windows, start Podman:
Open a Debian container without root:
podman run -it debian bashInside the container:
Describe the results you received
Running
podman imagesas the non-root user fails with:Running with
sudoworks:Describe the results you expected
Cause
The default user inside the Podman machine has limited sub-ID ranges:
Meanwhile, inside the container, the ID mappings are:
$ cat /proc/self/uid_map 0 1000 1 1 100000 65536Same for
/proc/self/gid_map.This is because the user
SUB_UID/SUB_GIDranges (100000–165535) are smaller than the mapped range (100000:), nested rootless Podman cannot allocate sufficient IDs, causing namespace setup to fail.Workaround
Manually increasing the user’s sub-ID range inside the Podman machine by editing
/etc/subuidsand/etc/subgids, then restarting the machine, solves the issue.podman info output
N/APodman in a container
Yes
Privileged Or Rootless
Rootless
Upstream Latest Release
Yes
Additional environment details
WSL on Windows
Additional information
No response