getcursor / cursor

The AI Code Editor
https://cursor.com
25.16k stars 1.57k forks source link

The SUID sandbox helper binary was found, but is not configured correctly (Ubuntu 24.04) #1683

Open dushmanta05 opened 2 months ago

dushmanta05 commented 2 months ago

When I tried to run the AppImage on my Ubuntu 24.04 machine it throws this error

[1299004:0825/180107.141125:FATAL:setuid_sandbox_host.cc(158)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /tmp/.mount_cursorQRdVpG/chrome-sandbox is owned by root and has mode 4755.
Trace/breakpoint trap (core dumped)

I tried a solution from stack overflow although it worked by adding --no-sandbox.

nuclearcat commented 2 months ago

You can also use:

sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
johann-petrak commented 2 months ago

Not very reassuring if the first thing one sees is a fatal error like that without any useful explanation. All my other editors so far managed to not show such an error.

undrash commented 2 months ago

I don't like the workarounds disabling security features. Will this be fixed?

nuclearcat commented 2 months ago

Same here and there is no really good feedback/interaction with developers, despite they use opensource code.

Imobacho commented 2 months ago

Same here

dlorriman commented 2 months ago

Any idea when this'll be fixed?

Kinda makes cursor unusable for most Ubuntu 24.04 users :shrug:

martinkrung commented 1 month ago

This worked for me,

Screenshot at 2024-09-23 15-59-05

./cursor-0.41.2x86_64.AppImage --appimage-extract

sudo chown root:root squashfs-root/chrome-sandbox sudo chmod 4755 squashfs-root/chrome-sandbox

./squashfs-root/AppRun

I would not recommend to general set this:

sysctl -w kernel.apparmor_restrict_unprivileged_userns=0

dushmanta05 commented 1 month ago

@martinkrung I've also implemented the same solution from Claude. Thanks.

mnguyen081002 commented 1 month ago

Work with ./cursor.AppImage --no-sandbox

sudokaiju commented 1 month ago

I'm still getting the SQLite errors even when using the --no-sandbox flag on fedora 40. I have the business plan so this needs to be fixed ASAP.

sevenjay commented 1 month ago

AppImage installation package, permission solution for Ubuntu 24.04

Ubuntu 24.04 restricts the use of non-privileged user namespaces. This affects all non-privileged programs on the system. An AppArmor configuration file must be written. You can install the AppImage tool written in Go by the inventor of the AppImage format.

mkdir -p /opt/appimages
url_path=`wget -q https://github.com/probonopd/go-appimage/releases/expanded_assets/continuous -O - | grep "appimaged-.*-x86_64.AppImage" | head -n 1 | cut -d '"' -f 2`
wget -c https://github.com/$url_path -P /opt/appimages/
chmod +x /opt/appimages/appimaged-851-x86_64.AppImage
/opt/appimages/appimaged-851-x86_64.AppImage
systemctl -l --no-pager --user status appimaged

After this, you just need to place the AppImage files in /usr/local/bin/ for automatic installation.