It's likely an selinux denial.  Can you temporarily disable selinux, or
check your selinux denial log?

Paul (on cc) should be able to offer the chcon command needed to make the
dir accessible from the container.


On Fri, Feb 12, 2016 at 3:51 AM, Candide Kemmler <[email protected]>
wrote:

> Hi,
>
> I'm currently trying to create a persistent instance of jenkins and I
> can't make sense of the documentation about permissions on Persistent
> Volumes.
>
> I first attached a new Disk on my VPS, called /dev/vde
>
> then here's what I did
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *mkfs -t ext3 /dev/vdeThen mount it:mount -t ext3 /dev/vde
> /var/lib/jenkinschmod -R 777 /var/lib/jenkinsCreate the persistent
> volume:oc create -f ...kind: PersistentVolumeapiVersion: v1metadata:  name:
> jenkinsdata  labels:    type: localspec:  capacity:    storage: 20Gi
> accessModes:    - ReadWriteOnce  hostPath:    path: "/var/lib/jenkins"*
> I can see that the the volume has rightly been claimed by the jenkins pod:
>
> oc get pvc
> NAME      LABELS                                 STATUS    VOLUME
>  CAPACITY   ACCESSMODES   AGE
> jenkins   template=jenkins-persistent-template   Bound     jenkinsdata
> 20Gi       RWO           39m
>
> but I'm seeing Permission errors in the deployment logs:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *Copying Jenkins configuration to /var/lib/jenkins ... cp: cannot create
> regular file '/var/lib/jenkins/config.xml.tpl': Permission denied cp:
> cannot create directory '/var/lib/jenkins/jobs': Permission denied cp:
> cannot create directory '/var/lib/jenkins/users': Permission denied mkdir:
> cannot create directory '/var/lib/jenkins/plugins': Permission
> denied Copying 1 Jenkins plugins to /var/lib/jenkins ... cp: cannot create
> regular file '/var/lib/jenkins/plugins/': Not a directory Creating initial
> Jenkins 'admin' user ... sed: can't read
> /var/lib/jenkins/users/admin/config.xml: No such file or
> directory /usr/libexec/s2i/run: line 36: /var/lib/jenkins/password:
> Permission denied touch: cannot touch '/var/lib/jenkins/configured':
> Permission denied Running from: /usr/lib/jenkins/jenkins.war webroot:
> EnvVars.masterEnvVars.get("JENKINS_HOME") Feb 12, 2016 8:50:29 AM
> winstone.Logger logInternal INFO: Beginning extraction from war file Feb
> 12, 2016 8:50:29 AM winstone.Logger logInternal INFO: Winstone shutdown
> successfully Feb 12, 2016 8:50:29 AM winstone.Logger logInternal SEVERE:
> Container startup failed java.io.FileNotFoundException:
> /var/lib/jenkins/war/META-INF/MANIFEST.MF (No such file or directory)at
> java.io.FileOutputStream.open0(Native Method) at
> java.io.FileOutputStream.open(FileOutputStream.java:270) at
> java.io.FileOutputStream.<init>(FileOutputStream.java:213) at
> java.io.FileOutputStream.<init>(FileOutputStream.java:162) at
> winstone.HostConfiguration.getWebRoot(HostConfiguration.java:280) at
> winstone.HostConfiguration.<init>(HostConfiguration.java:83) at
> winstone.HostGroup.initHost(HostGroup.java:66) at
> winstone.HostGroup.<init>(HostGroup.java:45) at
> winstone.Launcher.<init>(Launcher.java:143) at
> winstone.Launcher.main(Launcher.java:354) at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at
> java.lang.reflect.Method.invoke(Method.java:497) at
> Main._main(Main.java:293) at Main.main(Main.java:98)*
>
>
> I thought that setting the permissions to 777 would guarantee that anyone
> can do anything with the files under /var/lib/jenkins but that is
> apparently not the case. Of course, ideally I would know what user and
> group is going to want to use this directory but I have trouble finding out
> about this, especially since the user is running from within the jenkins
> container (to be honest this *really* gets me confused).
>
> Any clues, pointers,...?
>
> Candide
>
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>
>


-- 
Ben Parees | OpenShift
_______________________________________________
users mailing list
[email protected]
http://lists.openshift.redhat.com/openshiftmm/listinfo/users

Reply via email to