--detach-netns does not seem to work on Ubuntu 25.04 (https://cloud-images.ubuntu.com/plucky/20250309/plucky-server-cloudimg-arm64.img, kernel 6.12.0-16-generic #16-Ubuntu)
$ rootlesskit --net=slirp4netns --detach-netns bash
WARN[0000] [rootlesskit:parent] specifying --disable-host-loopback is highly recommended to prohibit connecting to 127.0.0.1:* on the host namespace (requires pasta, slirp4netns, or VPNKit)
[rootlesskit:child ] error: failed to create a detached netns on "/tmp/rootlesskit680628522/netns": failed to execute [unshare -n mount --bind /proc/self/ns/net /tmp/rootlesskit680628522/netns]: exit status 32 (out="mount: /tmp/rootlesskit680628522/netns: permission denied.\n dmesg(1) may have more information after failed mount system call.\n")
This seems new in Ubuntu 25.04.
The issue does NOT happen on:
- Ubuntu 24.10, kernel
6.11.0-19-generic #19-Ubuntu
- Alpine 3.12.1, kernel
6.12.8-0-virt #1-Alpine
- openSUSE Tumbleweed, kernel
6.13.5-1-default #1
- Fedora Rawhide, kernel
6.14.0-0.rc5.20250306git848e07631744.46.fc43.aarch64 #1
Workaround