logo       

Re: Running Jetty as Root under Linux: msg#00006

java.jetty.general

Subject: Re: Running Jetty as Root under Linux


i would strongly recommend you dump the idea of running jetty as the root,
just create a bridge between jetty and a custom application (which is
being run with root rights and can access the devices).

the bridge can be anything from a simple socket based command/response interface
up to javas rmi , but as the first one is far more simple to create & implement,
i would encourage you to choose it.

this way you would also get a cleaner picture where the problem could relay.

the thing about running jetty as the root is that, every time you update your
webapp, you could possibly create a security flaw by yourself, which once
discovered
will leave your machine open to any kind of hostile attacks. a neutral bridge
would
lower or nil at all these possibilities to attack your machine as the root user.

the first reason why unix system has the root account, is keeping the security
tight, running a webserver or anything alike that as the root, will make the
whole effort of the platform pointless.

if your app is very jetty bound, just use 2 jettys, one to server the web and
the other which listens to local sockets only and gets it's requests from the
first jetty server (and runs as root). this way you could probably still get
the effect of accessing the com ports as root, at the same time, your web server
will be in normal privileges.

i don't believe jetty has any issues with root privileges, cause jetty doesn't
know a thing about who is running it. the jvm shouldn't be care for that
neither.

just incase nothing seems to help, can you post your machine's operating system
and jvm vendor and version ? could it be that your os kernel version has issues
with the whole jvm ?

so far complete freezes with jetty have been noticed in pretty rare cases, one
of
them was running out of filehandles. the other ones as i think i can recall,
were
related to threadpooling, but that should be fixed in your version.

martin

Andrea Alimonti wrote:
> Hi, I have a web application running on Jetty 4.2.21 on a Linux box. My
> application needs to use serial devices through java comm-api so I'm
> forced to run jetty as root user.
> Now, after few hours jetty (actually the entire jvm) freeze completely.
> For testing purposes, I'm modifing my app leaving only the communication
> layer to see if the problem arises with serial ports.
> In the meantime do you know if there is any problem running Jetty with
> root privileges?
>
> Thank you in advance
>
> P.S: Special Thanks to Bocio
>



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise