title: Openshift pod complains about missing directories for image
body: <p>I tested my ApachedMQ image on Ubuntu and it works fine with Docker.
  On Openshift deploying the same image does not work.
  It should work out of the box, just like Ubuntu, but it always complains about missing directories in the pod, or lack of permissions on directories in the pod. Below you will see errors regarding the former.</p>
  
  <p>I am using the FREE edition of Openshift online v3.x
  I am only using the console to deploy from the image.
  Below just a sample of the log messages when the pod is ramping up for the deployment.</p>
  
  <pre><code>java.io.FileNotFoundException: /opt/activemq/data/activemq.log (Permission denied)
  Caused by: java.io.IOException: Failed to create directory '/opt/activemq/data/kahadb'
  </code></pre>
  
  <p>Any help would be much appreciated, as this image should IMO, be deployable from the console without any YAML and oc CLI necessary.
  Some log trace information:
  <code>INFO: Loading '/opt/activemq/bin/env'
  INFO: Using java '/docker-java-home/jre/bin/java'
  INFO: Starting in foreground, this is just for debugging purposes (stop process by pressing CTRL+C)
  INFO: Creating pidfile /opt/activemq/data/activemq.pid
  bin/activemq: 484: bin/activemq: cannot create /opt/activemq/data/activemq.pid: Permission denied
  Java Runtime: Oracle Corporation 1.8.0_141 /usr/lib/jvm/java-8-openjdk-amd64/jre
    Heap sizes: current=62976k  free=58714k  max=932352k
      JVM args: -Xms64M -Xmx1G -Djava.util.logging.config.file=logging.properties -Djava.security.auth.login.config=/opt/activemq/conf/login.config -Dcom.sun.management.jmxremote -Djava.awt.headless=true -Djava.io.tmpdir=/opt/activemq/tmp -Dactivemq.classpath=/opt/activemq/conf:/opt/activemq/../lib/: -Dactivemq.home=/opt/activemq -Dactivemq.base=/opt/activemq -Dactivemq.conf=/opt/activemq/conf -Dactivemq.data=/opt/activemq/data
  Extensions classpath:
    [/opt/activemq/lib,/opt/activemq/lib/camel,/opt/activemq/lib/optional,/opt/activemq/lib/web,/opt/activemq/lib/extra]
  ACTIVEMQ_HOME: /opt/activemq
  ACTIVEMQ_BASE: /opt/activemq
  ACTIVEMQ_CONF: /opt/activemq/conf
  ACTIVEMQ_DATA: /opt/activemq/data
  log4j:ERROR setFile(null,true) call failed.
  java.io.FileNotFoundException: /opt/activemq/data/activemq.log (Permission denied)
  ...
  log4j:ERROR setFile(null,true) call failed.
  java.io.FileNotFoundException: /opt/activemq/data/audit.log (Permission denied)
  ...
  Loading message broker from: xbean:activemq.xml
   INFO | Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@5bcab519: startup date [Fri Mar 16 21:10:18 UTC 2018]; root of context hierarchy
   WARN | Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.activemq.xbean.XBeanBrokerService#0' defined in class path resource [activemq.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: java.io.IOException: Failed to create directory '/opt/activemq/data/kahadb'
  ERROR | Failed to load: class path resource [activemq.xml], reason: Error creating bean with name 'org.apache.activemq.xbean.XBeanBrokerService#0' defined in class path resource [activemq.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: java.io.IOException: Failed to create directory '/opt/activemq/data/kahadb'
  org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.activemq.xbean.XBeanBrokerService#0' defined in class path resource [activemq.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: java.io.IOException: Failed to create directory '/opt/activemq/data/kahadb'</code></p>
  
  <p>SOLVED proof::<a href="https://i.stack.imgur.com/0G0h1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0G0h1.png" alt="enter image description here"></a></p>