Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Linux: terminal sandbox preflight fails — uid_map EPERM after mitigations (earlier: loopback error)
Mitigations applied from (did not resolve the issue):
Terminal sandbox fails on first start in 2.5.26: “loopback: failed to look up lo interface”
(Cursor staff reply: AppArmor profile cursor-system, remove stale cursor_sandbox, chmod 4755 on cursorsandbox.)
Summary
The terminal sandbox does not start. The UI shows: “Terminal sandbox could not start… AppArmor (kernel 6.2+)”. After applying the mitigations from the forum thread above, the problem remains; the error in the log changed from loopback to user namespace / uid_map.
Environment
- OS: Linux (Ubuntu family), kernel:
6.17.0-19-generic - Cursor:
.debinstall under/usr/share/cursor/ - Already verified:
CONFIG_SECURITY_LANDLOCK=y,CONFIG_USER_NS=y,kernel.unprivileged_userns_clone=1,user.max_user_namespacesis non-zero kernel.apparmor_restrict_unprivileged_userns=1
What we observed
1. Initially
In ~/.config/Cursor/logs/<session>/window1/exthost/exthost.log, preflight for cursorsandbox --preflight-only failed with:
Step 2.5/7 (loopback setup) failed: loopback: failed to look up lo interface
Host interface lo exists and is UP; the UI still shows the generic AppArmor hint.
2. After mitigations + Cursor restart
Same log location; new error:
Step 1-2/7 (user namespace) failed: Failed to write /proc/self/uid_map (mapping UID 0 -> 1000): Operation not permitted (os error 1) (errno 1)
Preflight no longer fails at the loopback step; it fails earlier, on writing /proc/self/uid_map.
Steps taken (no resolution)
Following the forum thread linked at the top:
-
Added AppArmor profile
/etc/apparmor.d/cursor-systemfor/usr/share/cursor/cursorwithuserns, loaded with:sudo apparmor_parser -r /etc/apparmor.d/cursor-system -
Checked for stale
cursor_sandbox:sudo aa-status | grep cursorIf present, removed/reloaded per forum instructions (
apparmor_parser -R,rm,systemctl restart apparmor). -
Set setuid on the sandbox helper:
sudo chmod 4755 /usr/share/cursor/resources/app/resources/helpers/cursorsandbox(
cursorsandboxshowsrwsr-xr-x, owned by root.) -
Restarted Cursor (and AppArmor where applicable).
Result: Sandbox still unsupported; preflight still fails with the uid_map / EPERM message above.
Expected
Sandbox preflight succeeds; no persistent “terminal sandbox could not start” warning.
Actual
Preflight fails; terminal sandbox does not start; only fallback behavior.
Logs
- Path pattern:
~/.config/Cursor/logs/<session>/window1/exthost/exthost.log - Search for:
[shell-exec:sandbox],Preflight failed
Optional (fill in when filing)
- Cursor version: Help → About
- Distro: e.g. Ubuntu 24.04 + exact point release
Steps to Reproduce
Launch the Cursor IDE. Error message about starting a sandbox for terminal appears.
Screenshots / Screen Recordings
Operating System
Linux
Version Information
Version: 2.6.21
VSCode Version: 1.105.1
Commit: fea2f546c979a0a4ad1deab23552a43568807590
Date: 2026-03-21T22:09:10.098Z
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Linux x64 6.17.0-19-generic
Does this stop you from using Cursor
No - Cursor works, but with this issue