Skip to content

Conversation

AkihiroSuda
Copy link
Member

On Ubuntu 25.04, unshare is subject to /etc/apparmor.d/unshare-userns-restrict that disables mounting.

$ rootlesskit --detach-netns bash
[rootlesskit:child ] error: failed to create a detached netns on "/tmp/rootlesskit2294453251/netns":
failed to execute [unshare -n mount --bind /proc/self/ns/net /tmp/rootlesskit2294453251/netns]:
exit status 32 (out="mount: /tmp/rootlesskit2294453251/netns: permission denied.\n       dmesg(1) may have more information after failed mount system call.\n")

Fix #494

Alternative to PR #495

On Ubuntu 25.04, `unshare` is subject to `/etc/apparmor.d/unshare-userns-restrict`
that disables mounting.

```
$ rootlesskit --detach-netns bash
[rootlesskit:child ] error: failed to create a detached netns on "/tmp/rootlesskit2294453251/netns":
failed to execute [unshare -n mount --bind /proc/self/ns/net /tmp/rootlesskit2294453251/netns]:
exit status 32 (out="mount: /tmp/rootlesskit2294453251/netns: permission denied.\n       dmesg(1) may have more information after failed mount system call.\n")
```

Fix issue 494

Alternative to PR 495

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
@AkihiroSuda AkihiroSuda added this to the v2.4.0 (tentative) milestone Mar 9, 2025
@AkihiroSuda AkihiroSuda merged commit d38d0a3 into rootless-containers:master Mar 9, 2025
6 checks passed
This was referenced Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant