-
Notifications
You must be signed in to change notification settings - Fork 15.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The SUID sandbox helper binary was found, but is not configured correctly #17972
Comments
Unfortunately there's no way we can configure this correctly automatically, because setting the appropriate permissions requires root privileges and we don't want to ask for a root password during Ideally, Arch would configure its kernel support unprivileged CLONE_NEWUSER and Chromium (and Electron) could use the namespace sandbox instead of relying on the old setuid sandbox. Apps that are distributed on Linux will need to incorporate this into their install process. See electron-userland/electron-installer-debian#184 and electron-userland/electron-installer-redhat#112 for example. During development, we should probably print something out on |
Hey, thanks for the super quick response! Does unprivileged CLONE_NEWUSER come from Please let me know if there's anything I can do to help, or if this is expected output on Arch I'm happy to close -- I understand that there's some jankiness to be expected when running bleeding-edge distros and I don't mind resolving this in a |
|
Is there a possible workaround in the meantime until every linux distro enables those features? |
@kitingChris The setuid sandbox IS the workaround. You just need to ensure that when developing / releasing an electron app your dev / packaging scripts set the permissions of the sandbox helper correctly as @nornagon linked above. |
See the original message:
Also see here #16631 (comment) So to make suid sandbox work you basically have to tweak the
The issue is more severe though if running appimage/snap packages, I have not yet revealed a decent workaround for these cases. It's working if appimage is executed with |
Executing |
I confirm executing |
@vladimiry I needed to first chown and then chmod. The other way round it didn't work. |
@burningTyger you are right, I just have changed the original message. |
@nornagon If we |
* SUID sandbox related, see electron/electron#17972
same here is bad new fonction for what need to change that... :( |
* SUID sandbox related, see electron/electron#17972
@MarshallOfSound zip does not support permissions, but ultimately the issue is not the chmod permission, but rather the owner. The setuid sandbox helper is suid to root, because it needs to perform functions that are only available to root. If it were possible to set the appropriate permissions without first gaining root privileges, that would be a very serious vulnerability in Linux. Fortunately for Linux, and unfortunately for us, that is not the case. Here are the options as I see them:
I'm leaning towards (2). It would ease development without compromising the security of the deployed app. I'm not yet sure what to do about snap/flatpak, as I'm not familiar with their workings. It's possible that they already sandbox the app sufficiently that we can disable sandboxing altogether in that situation, as we do when building the Mac App Store version of Electron. |
As for now, I like more the first option.
Such scenario would be somehow misleading. One might be successfully running unpackaged app without sandboxing, but there is a chance that the packaged app won't work the same way with enabled sandboxing. Like, for example, the case when you access the main process from the renderer process not through the
So a packaged app that was designed and developed as sandboxed might be executed without sandbox if no sandbox available. This doesn't sound good to me.
What does it mean exactly? What would be the way to enable sandboxing on Linux in the way the app either starts or fails if no sandboxing available (the current situation, forced sandboxing). |
I also like (1), but to defend (2) a little, the API exposed to the app wouldn't change when disabling the sandbox. The only thing we would disable is the OS-level sandbox. We would still load the app the same way, it just wouldn't be protected by the OS. |
Then it sounds good to me too. Thanks for the explanation. |
For me The issue was that I did To install electron on Windows and run from WSL:
|
Please stop recommending sudo as the solution. Not every user on a system has sudo permissions. I do not get why a non system app needs sudo permissions. This issue makes pretty much all Electron apps being crippled on Debian and Arch which are the most installed and used Linux distributions. Also --no-sandbox does not work
|
* SUID sandbox related, see electron/electron#17972
* The change disables the internal OS-level sandbox. So the app relies only on "strict" confinement for Snap and built-in isolation for AppImage. * See electron/electron#17972 * TODO Snap: explore "allow-sandbox: true" plug, see: - https://forum.snapcraft.io/t/the-browser-support-interface/7775 - https://docs.snapcraft.io/browser-support-interface - electron-userland/electron-builder#2100
I am able to reproduce this on Ubuntu 24 ARM. > The SUID sandbox helper binary was found, but is not configured correctly. See: - electron/electron#17972 - https://stackoverflow.com/questions/63780918/building-electron-linux-distro-the-suid-sandbox-helper-binary-was-found-but-i
…#1695) I am able to reproduce this on Ubuntu 24 ARM. > The SUID sandbox helper binary was found, but is not configured correctly. See: - electron/electron#17972 - https://stackoverflow.com/questions/63780918/building-electron-linux-distro-the-suid-sandbox-helper-binary-was-found-but-i
From toeverything/AFFiNE#6722 (comment) > Disable sandboxing entirely by launching with --no-sandbox. Adding this argument from JS is unfortunately insufficient, as the GPU process is launched before the main process JS is run. Ref: * electron/electron#17972
Preflight Checklist
Issue Details
Expected Behavior
Running
node_modules/.bin/electron --version
should outputv5.0.0
.To be clear, all commands create this error, but I'm using the
--version
flag for simplicity.Actual Behavior
Additional Information
If I
chown
andchmod
the file then it works fine, but my intuition is thatnpm install electron@latest
should work without those commands. Is this expected behavior?The text was updated successfully, but these errors were encountered: