Notes from setting up Jenkins as another user

Setting up Jenkins to run as another user

  • So, long story but it’s often helpful to do this to avoid problems with rights or setting up Jenkins to work as a desktop user

This file:

/etc/newsyslog.d/jenkins.conf

Needs to look like this: –

/var/log/jenkins/jenkins.log jenkins:jenkins 644 3 * $D0 J

Make sure it’s root:wheel (sudo chown root:wheel it)

See here for more details: – (Ignore the URL, nothing specific to Yosemite)

http://stackoverflow.com/questions/26483089/launchd-is-not-starting-jenkins-server-on-os-x-yosemite

Run Jenkins as another user will save a lot of messing around

This file:

/Library/LaunchDaemons/org.jenkins-ci.plist

Needs to have the group ‘wheel’ (users that can use su)

Needs to have the user ‘andygreen’ (or whatever you’re using as your desktop user)

NB: LaunchDaemons cannot have group or world write access or they won’t run. This took a while to figure out. Kept getting a permissions problem when I tried to launch it

To stop and start (respectively): –

  • sudo launchctl unload -w /Library/LaunchDaemons/org.jenkins-ci.plist
  • sudo launchctl load -w /Library/LaunchDaemons/org.jenkins-ci.plist

chown (-R) the jenkins directory (Users/Shared/jenkins) to andygreen:wheel

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: