Enhanced CruiseControl.rb to start itself as a different user/group

If you have tried running CruiseControl.rb using an init.d script(to wire it to start automatically on machine bootup), you have probably hunted for ways to run it as a relatively unprivileged user. 

When you start the process using init script, it starts off with root permission, which is a potential threat, specially so for a continuous integration server(where a malicious testcase, can corrupt/delete important files). CC.rb doesn’t support starting as a different user out of the box, so i enhanced it on a github fork(http://github.com/janmejay/cruisecontrol.rb/tree/master). I have also requested a merge to thoughtworks repository, so you can hope to find it there in sometime… 🙂 

To start it as another user and group, you can clone the forked repository and use…

# ./cruise start --user <username> --group <groupname>

If you are already using an init script and don’t want to disturb the cruise server, you can use something similar to what i have done for this init script.

About this entry