Install: Ubuntu AppArmor policy blocks bubblewrap user namespaces #132

Open
opened 2026-11-21 10:28:40 +00:00 by BeanBot · 1 comment
Member

Reported on Discord

Symptom

On Ubuntu, the default AppArmor policy blocks bwrap (bubblewrap) from creating namespaces. The reporter applied the custom policy below and loaded it; afterward, it worked.

> cat /etc/apparmor.d/bwrap
abi <abi/4.0>,
include <tunables/global>

profile bwrap /usr/bin/bwrap flags=(unconfined) {
    userns,
    include if exists <local/bwrap>
}

> sudo apparmor_parser -a /etc/apparmor.d/bwrap

Expected behavior

Beanstalk's bubblewrap sandbox should be usable on an Ubuntu system with its default AppArmor policy, or the required policy/workaround should be documented.

Beanstalk#92 (#92) tracks a separate Windows AppContainer failure caused by Git shims; it does not cover this Ubuntu/AppArmor issue. Its fix was merged in Beanstalk PR #93.

Missing information

The report does not specify the Beanstalk version, Ubuntu version, exact operation that failed, error output/logs, or whether the issue was observed in Beanstalk's Test Farm app, dashboard, or a test run.

Reported on [Discord](https://discord.com/channels/1569849200047427645/1570851074334793829/1573642714350755951) ### Symptom On Ubuntu, the default AppArmor policy blocks `bwrap` (bubblewrap) from creating namespaces. The reporter applied the custom policy below and loaded it; afterward, it worked. ```text > cat /etc/apparmor.d/bwrap abi <abi/4.0>, include <tunables/global> profile bwrap /usr/bin/bwrap flags=(unconfined) { userns, include if exists <local/bwrap> } > sudo apparmor_parser -a /etc/apparmor.d/bwrap ``` ### Expected behavior Beanstalk's bubblewrap sandbox should be usable on an Ubuntu system with its default AppArmor policy, or the required policy/workaround should be documented. ### Related issue Beanstalk#92 (https://git.magicbean.dev/MagicBeanDev/Beanstalk/issues/92) tracks a separate Windows AppContainer failure caused by Git shims; it does not cover this Ubuntu/AppArmor issue. Its fix was merged in Beanstalk PR #93. ### Missing information The report does not specify the Beanstalk version, Ubuntu version, exact operation that failed, error output/logs, or whether the issue was observed in Beanstalk's Test Farm app, dashboard, or a test run.

I am on KDE Neon (Ubuntu 24.04 LTS + KDE repos). bwrap came from the default Ubuntu repos

espadav8@treebeard:~
> sudo apt search bubblewrap
Sorting... Done
Full Text Search... Done
bubblewrap/noble-updates,noble-security,now 0.9.0-1ubuntu0.3 amd64 [installed]
  utility for unprivileged chroot and namespace manipulation

espadav8@treebeard:~
> which bwrap
/usr/bin/bwrap

espadav8@treebeard:~
> bwrap --version
bubblewrap 0.9.0
I am on KDE Neon (Ubuntu 24.04 LTS + KDE repos). `bwrap` came from the default Ubuntu repos ``` espadav8@treebeard:~ > sudo apt search bubblewrap Sorting... Done Full Text Search... Done bubblewrap/noble-updates,noble-security,now 0.9.0-1ubuntu0.3 amd64 [installed] utility for unprivileged chroot and namespace manipulation espadav8@treebeard:~ > which bwrap /usr/bin/bwrap espadav8@treebeard:~ > bwrap --version bubblewrap 0.9.0 ```
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Beanstalk#132
No description provided.