Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] eclipse jetty7x, and mortbay setuid

Hi Greg,
Great, thanks for the note. Based on that, I went ahead and dug into it, and after figuring it out I'm happy to report it works great! I did build the .so from sources. Here's my command line that starts Eclipse's Jetty 7, using the setuid module, from a bash script:

        java \
                -Duser.home=/home/tomcat \
      $TMP \
                -Djava.library.path=$JETTY_HOME/lib/ext \
                -Dconfig.home=$CONTAINER \
                -Djetty.home=$JETTY_HOME \
                -Djetty.port=$PORT \
                -Djetty.logs=$CONTAINER/logs \
                -DSTOP.PORT=$STOP_PORT \
                -DSTOP.KEY=$STOP_KEY \
                -DCLASSPATH= \
                -jar $JETTY_HOME/start.jar \
                OPTIONS=ext,Server,jsp-2.1 \
                $CONTAINER/etc/jetty-setuid.xml \
                $CONTAINER/etc/jetty.xml \
                2>$CONTAINER/logs/jetty.log 1>&2 &

Note (for anyone else reading this) that since I start it as root, and using setuid to run as the "tomcat" user, I have to fake Java out by manually setting the "user.home" System property.


On Feb 24, 2010, at 5:39 PM, Greg Wilkins wrote:


the jetty-7 modules that remain at codehaus (eg SetUID) have
retained the org.mortbay package naming.   But they certainly
do use the jetty-7 modules from eclipse.

If you get the jetty@codehaus downloads (eg jetty-hightide-7),
it should come with jetty-setuid compiled for jetty-7

Also the module itself is checked in at

and you can check it out and compile directly if you want.

maven info for the module is:

mvn dependency:tree
[INFO] Scanning for projects...
[WARNING] Overriding profile: 'env-windows' (source: pom) with new instance from source: pom
[INFO] Searching repository for plugin with prefix: 'dependency'.
[INFO] org.apache.maven.plugins: checking for updates from
[INFO] org.codehaus.mojo: checking for updates from
[INFO] ------------------------------------------------------------------------
[INFO] Building Jetty SetUID Java
[INFO]    task-segment: [dependency:tree]
[INFO] ------------------------------------------------------------------------
[INFO] [dependency:tree {execution: default-cli}]
[INFO] org.mortbay.jetty:jetty-setuid-java:jar:7.0.2-SNAPSHOT
[INFO] +- org.eclipse.jetty:jetty-server:jar:7.0.1.v20091125:compile
[INFO] |  +- javax.servlet:servlet-api:jar:2.5:compile
[INFO] | +- org.eclipse.jetty:jetty-continuation:jar: 7.0.1.v20091125:compile
[INFO] |  \- org.eclipse.jetty:jetty-http:jar:7.0.1.v20091125:compile
[INFO] |     \- org.eclipse.jetty:jetty-io:jar:7.0.1.v20091125:compile
[INFO] \- org.eclipse.jetty:jetty-util:jar:7.0.1.v20091125:compile
[INFO] ------------------------------------------------------------------------


Jason Thrasher wrote:
Hi All,
I'm interested in utilizing the setuid feature documented on the wiki, however I noticed that it references the class:
org.mortbay.setuid.SetUIDServer [1]

Since SetUIDServer doesn't use the org.eclipse package struture, is
this SetUIDServer part of the Jetty project?  Can I built
the mortbay module [2] for setuid and use it with the Eclipse Jetty
server [3]?

The documentation implies that org.mortbay.setuid.SetUIDServer will
work with jetty-7.0.1.v20091125, but it's not clear.


[2] setuid
jetty-dev mailing list

jetty-dev mailing list

Back to the top