You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Starting Ubuntu24.04 Canonical decided that namespaces are not safe and is preventing us from using it to sandbox applications.
12
-
namespaces are safe and a vital part of the security model of all web browsers, flatpak, electron apps, etc
10
+
INFO_MESSAGE_BASE="
11
+
Disabled unprivileged user-namespaces detected
13
12
14
-
To fix this issue I will need permission to disable the restriction, like all other linux distros do and several ubuntu forks had to undo.
13
+
Unprivileged user-namespaces are required to use this application.
15
14
16
-
For more details see: https://github.com/pkgforge-dev/Anylinux-AppImages/blob/main/useful-tools/fix-namespaces.md#why
15
+
Certain Linux distributions like Ubuntu since v24.04 and secureblue disable unprivileged user-namespaces by default due to safety concerns.
16
+
This is what prevents the applications to utilize sandboxing.
17
+
Unprivileged user-namespaces are safe and a vital part of the security model of all web browsers, flatpak, electron apps, etc.
17
18
19
+
For more details, see: https://github.com/pkgforge-dev/Anylinux-AppImages/blob/main/useful-tools/fix-namespaces.md#why
20
+
"
21
+
22
+
INFO_MESSAGE_WITHOUT_FIX="$INFO_MESSAGE_BASE
23
+
We do not have an automated way to enable unprivileged user-namespaces for your Linux distribution at the moment, so you will have to enable those manually.
24
+
"
25
+
26
+
INFO_MESSAGE_FIX="$INFO_MESSAGE_BASE
27
+
To fix this issue, I will need a permission to disable this restriction, like all the other Linux distributions do and several Ubuntu forks had to undo.
28
+
"
29
+
30
+
INFO_MESSAGE_FIX_APPARMOR="$INFO_MESSAGE_FIX
18
31
If you later wish to undo this change, remove: '/etc/sysctl.d/20-fix-namespaces.conf'
19
32
and then run 'sysctl -w kernel.apparmor_restrict_unprivileged_userns=1' or reboot.
20
33
"
21
-
WARNING="
22
-
WARNING: I'm not able to create a namespace and not sure what is preventing it.
23
-
We will continue without prompting but if something breaks you know why.
34
+
35
+
INFO_MESSAGE_FIX_SECUREBLUE="$INFO_MESSAGE_FIX
36
+
If you later wish to undo this change, run this command: 'ujust toggle-unconfined-domain-userns-creation'.
37
+
Changes are immediate, there is no need to reboot.
24
38
"
25
-
DO_NOT_ASK="Do you wish to not see this message again?"
26
39
27
-
# if this fails namespaces are disabled
28
-
_check_namespaces_work() {
29
-
unshare --user -p /bin/true >/dev/null 2>&1
30
-
}
40
+
DO_NOT_ASK="Do you wish to not see this message again about unprivileged user-namespaces?"
31
41
32
-
# Make sure we have all the needed deps
33
-
# Unlikely to be ubuntu or its spins if any of these conditions are true
0 commit comments