s g
s g

Reputation: 5667

Hudson job running as wrong user

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

Answers (1)

uncletall
uncletall

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

Related Questions