Skip to content

Degrade to unsandboxed mode in unpackaged apps on Linux #19550

Closed

Description

@nornagon

Electron v5 enabled mixed-sandbox mode by default, which means that on some Linux distributions, the chrome-sandbox helper must be setuid root in order for Electron to launch successfully. We don't set this permission automatically during npm install because doing so would require root access. While we do not wish to automatically degrade to non-sandboxed mode in production when this situation is detected, it would be expedient to do so during development, preferably with a big hard-to-ignore warning printed to the console warning that the app will fail to boot when packaged, and instructions on how to set the correct permissions.

Ref #17972

Activity

  1. p3x-robot commented on Jul 31, 2019

    @p3x-robot

    so it means that above v4 the electron builder is not working with AppImage at all, as there are no workarounds that i know?
    there was a before packing rename the app to app and app to app.sh or something like that, but that created 2 icons that was the problem was. and snap is fixed by now, but given i have to provide 2 builds (both appimage and snap) i have to stick to electron v4.
    it is a good security feature, but i can only work from npm, otherwise it will give you the setuid or something like that error.

  2. nornagon commented on Jul 31, 2019

    @nornagon
    ContributorAuthor

    @p3x-robot Please file an issue against whatever you're using to create AppImages.

  3. p3x-robot commented on Jul 31, 2019

    @p3x-robot

    @nornagon file an issue for electron builder or electron itself?

  4. vladimiry commented on Jul 31, 2019

    @vladimiry

    @p3x-robot electron itself works but there is a matter of proper package preparing, ie electron-builder at the moment doesn't support the case out of the box except for the snap target type (but can be done with custom scripts, repackaging stuff). There are also at least 2 workarounds, see the previous messages for details.

  5. nornagon commented on Jul 31, 2019

    @nornagon
    ContributorAuthor

    This issue is for a specific task (automatic degradation in unpackaged mode), please continue to use #17972 to discuss the core issue.

  6. pronebird commented on Aug 30, 2019

    @pronebird

    There is no point in doing this, because when developing it's easy to pass a --no-sandbox flag. Degrading the sandbox under certain conditions sounds like creating even more confusion for developers that would likely stumble upon inconsistent behaviour when in development and production.

  7. nornagon commented on Mar 9, 2022

    @nornagon
    ContributorAuthor

    People seem to be managing just fine without this, so I'm going to close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions