From 83842b8de900b7e5d2f5e18f3a5aa1da53f14055 Mon Sep 17 00:00:00 2001 From: neilverc Date: Mon, 23 Nov 2026 14:00:36 -0500 Subject: [PATCH] fsmount: mount FUSE directly when running as root Ubuntu 25.04+ hosts (including GitHub ubuntu-latest, now 26.04) apply an AppArmor profile to fusermount3 by path, even in containers started with apparmor=unconfined, so every bridge file-sharing mount failed with 'fusermount3: mount failed: Permission denied'. The interceptor runs as root with CAP_SYS_ADMIN, so call mount(2) directly via go-fuse DirectMount and keep fusermount as the fallback. Co-authored-by: vercel-v[bot] <353008837+vercel-v[bot]@users.noreply.github.com> --- pkg/fsmount/client.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/fsmount/client.go b/pkg/fsmount/client.go index 7e75514..5cdb6ab 100644 --- a/pkg/fsmount/client.go +++ b/pkg/fsmount/client.go @@ -74,6 +74,15 @@ func Mount(ctx context.Context, mountpoint, remoteRoot string, client bridgev1.B // user; AllowOther + default permissions let all users in the // container read the mount. DisableXAttrs: true, + // Call mount(2) directly when running as root, falling back to + // fusermount otherwise. Ubuntu 25.04+ hosts (including GitHub's + // ubuntu-latest runners) ship an AppArmor profile that attaches to + // the fusermount3 binary by path, even inside a container started + // with apparmor=unconfined, and it denies these mounts with + // "fusermount3: mount failed: Permission denied". The interceptor + // runs as root with CAP_SYS_ADMIN, so it doesn't need the setuid + // helper. See https://github.com/moby/moby/issues/50013. + DirectMount: os.Geteuid() == 0, }, }