clone: Operation not permitted when creating user namespace in rootless Podman
0 reputation · 11 Aug 2026, 23:14 UTC
Goal: achieve a repeatable development environment that relies on rootless containers (e.g., Podman, bubblewrap) and works identically on any Linux host, regardless of distribution‑specific user namespace settings.
Constraints: on Debian/Ubuntu the kernel.unprivileged_userns_clone sysctl may be set to 0, while Ubuntu 23.10+ enforces AppArmor restrictions on unprivileged userns; the kernel knob user.max_user_namespaces can also cap namespace creation per user. Enabling unprivileged user namespaces improves usability but historically widens the local privilege‑escalation attack surface, whereas restricting them forces reliance on setuid helpers such as newuidmap/newgidmap, which may not provide the same level of isolation for all sandboxing tools.
Questions: What are the security trade‑offs of enabling unprivileged user namespaces globally on a multi‑user system? How can administrators confirm that setuid helpers provide equivalent isolation without introducing new risks? Is there a policy (e.g., per‑user namespace limits or conditional AppArmor profiles) that balances repeatable usability with acceptable security?