Reputation: 99
My jenkins is giving me error when I am changing the default JENKINS_HOME to my location in ubuntu.
Unable to create the home directory ‘/media/mysystem/Data/Jenkins’. This is most likely a permission problem.
I had edited this file "Jenkins" inside /etc/default folder and changed the jenkins home but when I start the jenkins I am getting the above error message.
I also tried giving full permission to my media using -
cd /media/mysystem/Data/
sudo chmod -R -v 777 *
but no luck
Here mysystem is my username and Data is the media name
Upvotes: 1
Views: 1476
Reputation: 11477
Change the jenkins user's home directory by modifying configure file.
vim /etc/init.d/jenkins
Change $JENKINS_HOME
variable.And then create the folder and use chown
command to change file owner.
mkdir -p /media/mysystem/Data/Jenkins
cd /media/mysystem/Data/Jenkins
cp -Rf /var/lib/jenkins .
chown -R jenkins:jenkins *
service jenkins start (/etc/init.d/jenkins start)
Usually,you can just change the $JENKINS_HOME
and restart.
Hope this helps.
Upvotes: 1