Reputation: 5667
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
Upvotes: 0
Views: 793
Reputation: 6842
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
Upvotes: 1