# Running as root without --no-sandbox is not supported

**URL:** <https://forums.balena.io/t/running-as-root-without-no-sandbox-is-not-supported/18845>\
**Category:** Product support\
**Created:** [July 10, 2019, 9:43pm UTC](https://forums.balena.io/t/running-as-root-without-no-sandbox-is-not-supported/18845 "2019-07-10T21:43:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![AdamLee](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/adamlee/32/2149_2.png) [@AdamLee](https://forums.balena.io/u/AdamLee)\
**Post date:** [July 10, 2019, 9:43pm UTC](https://forums.balena.io/t/running-as-root-without-no-sandbox-is-not-supported/18845/1 "2019-07-10T21:43:49Z")

</div>

After starting with resin-electronjs I’ve since updated to electron 5 since I was having some issues with UI elements. Unfortunately now I’m running into some issues with my container it appears. I’ve resolved several issues along the way but now I am absolutely stuck on this error message:

_10.07.19 16:31:11 (-0500) app [45:0710/213111.584824:ERROR:zygote\_host\_impl\_linux.cc(89)] Running as root without --no-sandbox is not supported. See [https://crbug.com/638180](https://crbug.com/638180)._

I’ve done a bit of research and tried several solutions, including setting the no sandbox flag via electron:

**app.commandLine.appendSwitch(’–no-sandbox’);**

Has anyone managed to get an electron 5 app running here?

---

<div class="post-metadata">

**Author:** ![richbayliss](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/richbayliss/32/1054_2.png) [@richbayliss](https://forums.balena.io/u/richbayliss)\
**Post date:** [July 11, 2019, 7:12am UTC](https://forums.balena.io/t/running-as-root-without-no-sandbox-is-not-supported/18845/3 "2019-07-11T07:12:22Z")

</div>

We have asked internally to see if anyone has tried this yet, and we will post back here if we have anything 👍

Thanks for the info either way, and if you do happen to solve it in the meantime, please do update us, it would be very welcomed.

Rich

---

<div class="post-metadata">

**Author:** ![zvin](https://avatars.discourse-cdn.com/v4/letter/z/a5b964/32.png) [@zvin](https://forums.balena.io/u/zvin)\
**Post date:** [July 11, 2019, 4:14pm UTC](https://forums.balena.io/t/running-as-root-without-no-sandbox-is-not-supported/18845/5 "2019-07-11T16:14:40Z")

</div>

You can try adding `--no-sandbox` after `electron` here [https://github.com/balena-io/resin-electronjs/blob/master/app/start.sh#L21](https://github.com/balena-io/resin-electronjs/blob/master/app/start.sh#L21) .

---

<div class="post-metadata">

**Author:** ![zvin](https://avatars.discourse-cdn.com/v4/letter/z/a5b964/32.png) [@zvin](https://forums.balena.io/u/zvin)\
**Post date:** [July 11, 2019, 4:15pm UTC](https://forums.balena.io/t/running-as-root-without-no-sandbox-is-not-supported/18845/6 "2019-07-11T16:15:45Z")

</div>

Or create a user and run your app with it.

---

<div class="post-metadata">

**Author:** ![AdamLee](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/adamlee/32/2149_2.png) [@AdamLee](https://forums.balena.io/u/AdamLee)\
**Post date:** [July 12, 2019, 4:38pm UTC](https://forums.balena.io/t/running-as-root-without-no-sandbox-is-not-supported/18845/8 "2019-07-12T16:38:43Z")

</div>

> –no-sandbox

Thanks so much [@zvin](https://forums.balena.io/u/zvin) (and you too [@richbayliss](https://forums.balena.io/u/richbayliss)) - that did work. I’m a little disappointed that electron wouldn’t handle that switch but this is fine for now. I’ll also look at creating a separate non root user to run the application which seems like the objectively better approach.

You guys are awesome.

---

<div class="post-metadata">

**Author:** ![taotehking1978](https://avatars.discourse-cdn.com/v4/letter/t/dfb087/32.png) [@taotehking1978](https://forums.balena.io/u/taotehking1978)\
**Post date:** [September 24, 2020, 6:17pm UTC](https://forums.balena.io/t/running-as-root-without-no-sandbox-is-not-supported/18845/10 "2020-09-24T18:17:29Z")

</div>

Se soluciona haciendo la instalación como usuario local. Por ejemplo, se le dan los permisos sudo chmod u+x fichero.appimage y después el programa para poder abrirlo hacer lo siguiente: ./fichero.appimage --no-sandbox  
Y así se soluciona.
