0
votes

I have a Hudson build job which runs a script called 'testUser.sh' which contains only one command: 'whoami'. The first line of the console output says 'Started by user ctisbuild', but the output of the whoami/testUser.sh script is 'root'.

Any idea what's going on? This used to be working properly, I don't know what changed to cause this.

Thanks

1
Is your build job running on the Hudson master or on a slave ? It sounds like the master or slave process is running as the root user. - gareth_bowles
It's running on the master. I did 'ps -ef | grep hudson' to check the process owner but it didn't return anything. - s g
The ps output will depend on the way you've installed Hudson. Try 'ps -ef | grep java' to see if you can find the right process. - gareth_bowles

1 Answers

1
votes

I guess you are running hudson as root from the command line? Using java -jar hudson.war? The "Started by user ctisbuild" is the user if of the user that trigger the build, the person who clicked on "Build Now". This is not the userid that Hudson will use. This user id is specified in the /etc/default/hudson as HUDSON_USER

For more details read the hudson wiki