Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

node-webkit (nw.js) Ubuntu 12.04 LTS SUID sandbox error

I am creating nodewebkit and webrtc based desktop application for video streaming. While creating, I am trying to use getusermedia API but getting the below error on my Linux box.

[15464:0224/125017:ERROR: browser_main_loop.cc(162)] Running without the SUID sandbox! See https://code.google.com/p/chro... for more information on developing with the sandbox on. ATTENTION: default value of option force_s3tc_enable overridden by environment.

With some help from google, I found out below details about suid.

SUID (Set owner User ID up on execution) is a special type of file permissions given to a file. Normally in Linux/Unix when a program runs, it inherits access permissions from the logged in user. SUID is defined as giving temporary permissions to a user to run a program/file with the permissions of the file owner rather that the user who runs it. In simple words users will get file owner’s permissions as well as owner UID and GID when executing a file/program/command

According to my understanding, node-webkit (nw.js) doesn't need a sandbox to run. Please correct me if I am wrong. I am running the same nw application on my Mac OS X Mavericks and it is running flawlessly. I am really confused here because of the below questions.

  1. Should I install a chromium sandbox before running nw on Linux (though I haven't found any such directives on nw.js github page)?

  2. If not, what changes I need to make to my Ubuntu 12.04 LTS so that my application won't ask for a sandbox?

like image 267
saurav Avatar asked Feb 24 '15 11:02

saurav


2 Answers

Try adding this to your package.json:

"chromium-args": "--disable-setuid-sandbox"

It will disable the sandbox on the instance of chromium that nw.js is using.

like image 66
Josh Lankford Avatar answered Sep 20 '22 03:09

Josh Lankford


The message can be ignored as a sandbox is not used/needed in node-webkit.

There is actually an issue about this message in the bug tracker.

like image 20
leszek.hanusz Avatar answered Sep 22 '22 03:09

leszek.hanusz