[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[jetty-users] SetUID issues with Jetty 7.1.5
|
I am using
CentOS release 5.4 (Final)
2.6.18-164.2.1.el5xen
java -version
java version "1.6.0_21"
Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
Java HotSpot(TM) 64-Bit Server VM (build 17.0-b16, mixed mode)
jetty-hightide-7.1.5.v20100705.tar.gz
Compiled the setuid libs from the source and lib/ext contents are
jetty-setuid-java-7.2.0-SNAPSHOT.jar
libsetuid.so
file libsetuid.so
libsetuid.so: ELF 64-bit LSB shared object, AMD x86-64, version 1
(SYSV), not stripped
start.ini reads as
--exec
-Xmx512m
-Xmn256m
-Djava.library.path=lib/ext
OPTIONS=Server,plus,jmx,jta,jdbc,annotations,jsp,resources,websocket,ext
etc/jetty.xml
etc/jetty-setuid.xml
jetty-setuid.xml reads as
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN"
"http://jetty.mortbay.org/configure.dtd">
<Configure id="Server" class="org.mortbay.setuid.SetUIDServer">
<Set name="startServerAsPrivileged">true</Set>
<Set name="umask">2</Set>
<Set name="uid">jetty</Set>
<Set name="gid">jetty</Set>
</Configure>
Have also tried modifying it to use numeric uid/gid.
I get the following error message on startup and the jetty server
keeps running as root instead of uid jetty
2010-07-14 09:24:02.700:WARN::EXCEPTION
java.lang.ClassCastException: class org.mortbay.setuid.SetUIDServer
at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:218)
at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1007)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:983)
>From google search I see this error but related to jetty 6.x version.
So does setuid work fine for other folks on Jetty version 7.x
TIA
-Tarun