Cursor 3.24.9: remote SSH sandbox blocked by AppArmor on Ubuntu 24.04.5

Where does the bug appear (feature/product)?

Somewhere else…

Describe the Bug

Cursor 3.24.9 Stable on Windows, connected over SSH to Ubuntu 24.04.5 LTS.

Client and remote server commit:
cd6d2a1f2e56e9841f0ed9c7c24542087b4e69b0

Remote Ubuntu configuration:

  • kernel.apparmor_restrict_unprivileged_userns = 1
  • cursor-sandbox-apparmor is not installed
  • No Cursor-named files in /etc/apparmor.d/
  • aa-status shows unprivileged_userns but no Cursor-named profile
  • cursorsandbox is owned by ubuntu with permissions -rwxr-xr-x

Kernel logs show cursorsandbox transitioning to unprivileged_userns,
then AppArmor DENIED capability sys_admin.

Please provide the current supported AppArmor package and installation
instructions for remote SSH sandboxing with Cursor 3.24.9.

Steps to Reproduce

Use Cursor 3.24.9 Stable on Windows and connect through Remote SSH to an Ubuntu 24.04.5 LTS server.

On the remote server, leave the following Ubuntu security setting enabled:

text

kernel.apparmor_restrict_unprivileged_userns = 1
The remote server has no cursor-sandbox-apparmor package installed, and no Cursor-specific AppArmor profile appears in the loaded-profile check.

Ask Cursor Agent to execute a terminal command inside its sandbox on the remote server.

Observe that the terminal sandbox fails to start or execute the command.

In a separate SSH terminal, inspect the kernel logs:

bash

sudo journalctl -k --since “1 hour ago” --no-pager | grep -Ei ‘apparmor.*DENIED|cursorsandbox’
The logs show cursorsandbox transitioning from unconfined to the unprivileged_userns profile, followed by AppArmor DENIED entries for capability sys_admin.

Expected Behavior

Cursor should be able to initialize its remote terminal sandbox and execute supported commands without requiring AppArmor to be disabled or Ubuntu’s system-wide user-namespace restriction to be removed.

If a separate AppArmor package or profile is required for remote SSH sandboxing, Cursor should clearly identify the missing prerequisite and provide current installation instructions appropriate for the installed Cursor version.

Operating System

Windows 10/11

Version Information

Cursor IDE 3.24.9 (Stable, user setup)
OS: Windows_NT x64 10.0.26200
Commit: cd6d2a1f2e56e9841f0ed9c7c24542087b4e69b0

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey, thanks for the detailed report. With the logs, the issue is clear right away.

The Remote SSH server that Cursor installs on your Ubuntu host doesn’t include an AppArmor profile. When kernel.apparmor_restrict_unprivileged_userns = 1, sandbox-helper gets placed into the unprivileged_userns profile and is denied sys_admin, which is exactly what shows up in your kernel log. The fix is to install the cursor-sandbox-apparmor package on the remote host. The current version is 0.6.2. The docs still mention 0.6.0, but that version is missing some network rules needed for AppArmor 4.

On the Ubuntu server:

  1. Download and install the package. apt will also pull in the bubblewrap dependency. It may ask whether to add the Cursor apt repository. Either answer is fine.
curl -fsSL https://downloads.cursor.com/lab/enterprise/cursor-sandbox-apparmor_0.6.2_all.deb -o /tmp/cursor-sandbox-apparmor.deb
sudo apt install /tmp/cursor-sandbox-apparmor.deb
  1. Open /etc/apparmor.d/cursor-sandbox-remote with sudo. Inside the cursor_sandbox_remote block, right below the line signal (receive) peer=unconfined,, add this line. This prevents helper processes from piling up after each command:
  signal (send, receive) peer=cursor_sandbox_remote,
  1. Reload the profile:
sudo apparmor_parser -r /etc/apparmor.d/cursor-sandbox-remote
  1. Check that it loaded:
sudo aa-status | grep cursor

It should show cursor_sandbox_remote.

  1. In Cursor, close the Remote SSH window and reconnect to the server.

  2. Ask the agent to run echo hello in the sandbox.

If it still fails, send the output of these commands run on the server:

echo $HOME
find ~/.cursor-server -name cursorsandbox
sudo journalctl -k --since "10 minutes ago" --no-pager | grep -Ei 'apparmor.*DENIED|cursorsandbox'

The profile only applies if the helper is located under /home/<user>/.cursor-server/bin/..., so the path will immediately show whether the server is installed somewhere the profile doesn’t cover.

There’s also a separate thread about the signal rule from step 2 with more detail: Remote SSH: every sandboxed agent shell command leaks 2 orphan cursorsandbox processes (7 threads each) → user cgroup pids.max exhausted, host unusable

Also, I passed your note along to the team that Cursor should call out this prerequisite directly instead of leaving users to figure it out from kernel logs. Let me know how it goes.