Our Jenkins stack is configured to use
tomcat user by default. If you wish to use a different user you have two options:
Install Jenkins stack as a non-privileged user, then Jenkins will run as this user, this way is tested on our side and the recommended one. (You must assure that the user exists before installing the stack)
You can try to install it as
root and modify the user
tomcat uses. To do that you should modify the file
changing the line
su tomcat -s /bin/sh -c "$TOMCAT_BINDIR/startup.sh"
su $JENKINS_USER -s /bin/sh -c "$TOMCAT_BINDIR/startup.sh"
where you have to define
$JENKINS_USER prior in the file or export it to your system envs.
After doing that, you should adapt your file permissions and ownership to fit this change, and restart the servers. It could be a little hard and tricky process, so we de not recommend this option.
Hope it helps.