Type: New Feature
Affects Version/s: None
Fix Version/s: None
Number of attachments :
Previously posted to jetty-discuss, but thought this might be a more suitable home
The basic approach here uses the commons-daemon utilities to control when a switch away from
root happens. In simple terms anything executed during configure() is done as root, commons-daemon then switches to the alternate user/group before calling start on any configured LifeCycles. (this includes request logs etc...)
Code is attached. Extract in the top level jetty directory to create
contrib/jetty-daemon. It also adds a MainDaemon class to start.jar so
that ClassLoading mechanism can be retained.
Instructions in the README.TXT should work for 6.1.4
In svn/6.1.6rc0 you'll need to revert /etc/jetty.xml to include the call
to open the connectors during configuration.
I've run this on an Ubuntu 7.04 box with the jsvc package installed.
Note that jsvc on linux must be run as root and the capabilities kernel
module must be loaded.