You are not logged in.

#1 2015-04-20 11:01:06

stukov
Member
Registered: 2015-04-20
Posts: 4

Chromium as root

I need to run chromium as root. After the latest update (42.0.2311.90) I cannot do it.
The error is this:

 [0420/105918:FATAL:setuid_sandbox_client.cc(126)] Check failed: IsFileSystemAccessDenied(). 
[1:1:0420/135918:ERROR:nacl_fork_delegate_linux.cc(314)] Bad NaCl helper startup ack (0 bytes)
[1:1:0420/135918:FATAL:setuid_sandbox_client.cc(126)] Check failed: IsFileSystemAccessDenied(). 

I have tried putting the

user-data-dir

or the

--user-data-dir

or the

user-data-dir=/root/.config/chromium/Default

or the

--user-data-dir=/root/.config/chromium/Default

in the

/root/.config/chromium/chromium-flags.conf

and none of these work. I always get the same error response that I linked.

Another thing that is weird, is that when I run it from command line and keep it running, and doing a

ps aux | grep -i chrom

I get this:

root      3291  2.6  0.2 433860 35096 pts/1    Sl+  14:05   0:00 /usr/lib/chromium/chromium user-data-dir=/home/user/.config/chromium
root      3293  0.0  0.0      0     0 pts/1    Z+   14:05   0:00 [chrome-sandbox] <defunct>
root      3302  0.0  0.0  10944  2252 pts/0    S+   14:05   0:00 grep -i chrom

I don't understand why i get the user-data-dir to be pointing at /home/user/ when I run it as root...

Last edited by stukov (2015-04-20 11:02:39)

Offline

#2 2015-04-20 11:20:19

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,412
Website

Re: Chromium as root

I need to run chromium as root

http://mywiki.wooledge.org/XyProblem


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#3 2015-04-20 11:23:36

stukov
Member
Registered: 2015-04-20
Posts: 4

Re: Chromium as root

I forgot to get permission from you.
Sorry mate.

Offline

#4 2015-04-20 12:04:31

ayekat
Member
Registered: 2011-01-17
Posts: 1,590

Re: Chromium as root

Welcome to the Arch forums!

stukov wrote:

Sorry mate.

https://wiki.archlinux.org/index.php/Fo … _not_flame

Wanting to run something like a web browser as root is very unusual, so the link Alad posted is more than an intermediately appropriate answer to your question.
Consequently, telling us a little more about why you seek to run chromium as root would be appreciated.

EDIT
But to give at least some useful information:

Check failed: IsFileSystemAccessDenied(). 

I don't know the inner workings of Chrome/chromium, but if it really does what it appears to be doing, it will always fail if run as root.

Last edited by ayekat (2015-04-20 12:07:40)


pkgshackscfgblag

Offline

#5 2015-04-20 12:39:26

stukov
Member
Registered: 2015-04-20
Posts: 4

Re: Chromium as root

I don't know the inner workings of Chrome/chromium, but if it really does what it appears to be doing, it will always fail if run as root.

I was affraid of that but I was thinking there would exist some simple bypass to that, that would be as simple as "chromium --user-data-dir".

The fact that it is very unusual does not justify the way Alad responded. Your response is indeed polite, his was quarrelsome, and this is why I am going to explain this to you.

I run everything at my desktop as root, as I am a network engineer, a network driver developer and tester for Linux and BSD.

I need to use raw sockets all the time and I also need to use internally developed chrome plugins that need to be run with elevated privileges through chrome. Yes, I can use sudo and yes I know what linux can offer regarding privilege elevation. However, errors regarding privileges at my programs may not have a direct visible error message and that might lead to huge work-hours loss.

This is the reason that I want to run as root, I have been doing this for the last 10+ years, I know that this represents a security vulnerability and I have accepted the risk. I don't need any more lectures about it, I have discussed about this alot and I am not interested in other people opinions about that, although I respect them. I don't propagandize why I believe it's an unecessary overhead for developers, network engineers and/or other professions to run their applications as non root. I expect the same behavior about other people that I ask for their help. It is really simple to just *NOT* reply to a forum post instead of saying something like "don't do that (implying 'don't do that because I don't and no-one else does')" and providing **ZERO** contribution to what the OP (me) is actually asking.

I would really appreciate to get an answer from someone that indeed cares to help me solve my problem.

Last edited by stukov (2015-04-20 12:42:17)

Offline

#6 2015-04-20 13:46:56

vostok4
Member
Registered: 2010-12-16
Posts: 70

Re: Chromium as root

It sounds a) unsupported, look here: https://groups.google.com/a/chromium.or … mVX82pCwwJ and b) that other things will break if you do manage to skip the checks, look here: https://groups.google.com/a/chromium.or … Ez49XfCuEJ

It sounds like the effort required to run Chromium as root is far from 0.

Offline

#7 2015-04-20 18:31:27

cedeel
Member
From: ~
Registered: 2009-08-25
Posts: 176
Website

Re: Chromium as root

Hello stukov,

First of all, unless you are developing Chromium itself, there is no reason to run it as root. Secondly, if you need to run a web browser as root for whatever reason you've conceived - there are plenty of other options to choose from.

Alad was right. You are trying to solve your issue of permissions with sockets by trying to solve your issue with Chromium not running as root.
People on this forum tend to give very concise answers. You might not like that, but it doesn't mean that it was intended to be rude. In fact, it's intended to convey a message very clearly.

You having 10+ years of experience doesn't necessarily mean that you know what you are doing with this, so that's just unnecessary to add in this context.

So in essence: Use tools that are intended to work with raw sockets. Find a browser that'll run as root if you need one.

Offline

#8 2015-04-20 20:15:23

stukov
Member
Registered: 2015-04-20
Posts: 4

Re: Chromium as root

Hello cedeel,

So in essence: Use tools that are intended to work with raw sockets. Find a browser that'll run as root if you need one.

That was exactly my point of asking the question I asked in the first place. Since I have been using chromium during the last years, I was hoping that I would continue to do so and I was trying to find a solution to that before I abandoned it.

Therefore, I was trying to achieve what I want to achieve with the means that I am used to. I was trying to solve my browser issue (in the context that I tried to describe) by trying to not change my browser. So in essence, no, Alads response was neither concise nor helpful.

The reason that I mentioned the years of experience, wasn't to somehow exalt myself. I apologise if I was perceived as "that guy". I was just trying to provide a context to ayecat's question and I was also trying to say that I am not really interested in sharing my opinion (or trying to persuade someone that I am right for that matter) on whether running a browser as root is correct or not.

So in essence, we have been wasting each other's time (precious or not) by trying to provide a response to a question that was never there to begin with, just because people perceive things so subjectively.

The most consise and helpful answer was vostok's.

Thank you for your help and time. For now I am convinced that I won't be using that browser.

Last edited by stukov (2015-04-20 20:18:24)

Offline

#9 2015-04-21 17:22:25

armbox
Member
Registered: 2015-04-21
Posts: 1

Re: Chromium as root

recompile kernel with

CONFIG_USER_NS=y

then run chromium with

--user-data-dir

Offline

#10 2015-05-01 19:15:22

c_explosive
Member
Registered: 2014-05-27
Posts: 4

Re: Chromium as root

Try  use:

chromium --no-sandbox --user-data-dir

It will run without sandbox but works fine.

Offline

#11 2015-09-27 02:50:16

francois.e
Member
Registered: 2011-11-02
Posts: 61

Re: Chromium as root

@c_explosive:
Thanks for that anwer right on topic.

It happens that some people work in root mode knowing the risk or that prefer the risk, given what they have to loose on their linux box.

To root or not to root, this is the question.

Offline

#12 2015-09-27 02:54:32

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,793

Re: Chromium as root


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB