Jenkins was running all fine on a RedHat Linux machine (a clean EC2 machine on AWS), until I decided to change the JENKINS_HOME
. I simply moved the Jenkins directory from /var/lib/jenkins
to /home/ec2-user/jenkins
and then created a symlink. (I followed the first answer to this question: Change JENKINS_HOME on Red Hat Linux?).
However when I restart Jenkins I get the error:
Unable to create the home directory ‘/var/lib/jenkins’. This is most likely a permission problem. To change the home directory, use JENKINS_HOME environment variable or set the JENKINS_HOME system property.
I tried changing JENKINS_HOME
in /etc/sysconfig/jenkins
, setting it to the new folder (which I suppose defeats the point of a symlink?) and I still get the same error
Unable to create the home directory ‘/home/ec2-user/jenkins’.
It is for backup purposes, so that I have all Jenkins data in a mounted external data storage (AWS Elastic File System).