title: Openshift Volume Mounts showing root:root
body: <p>I'm trying to run a SonarQube pod in Openshift but it seems to be mounting the persistent volume with root as the owner.</p>
  
  <p>How can we change this to a non-root user?
  I created my persistent volume with 'hostPath'.</p>
  
  <p>You can find some more information below:</p>
  
  <pre><code>Caused by: java.nio.file.AccessDeniedException: /opt/sonarqube/data/es
  at java.nio.file.Files.createDirectory(Files.java:674)
  at java.nio.file.Files.createAndCheckIsDirectory(Files.java:781)
  at java.nio.file.Files.createDirectories(Files.java:767)
  at org.elasticsearch.env.NodeEnvironment.(NodeEnvironment.java:169)
  at org.elasticsearch.node.Node.(Node.java:165)
  ... 6 common frames omitted
  </code></pre>
  
  <p>Here is the sonarqube directory screenshot</p>
  
  <p><a href="https://i.stack.imgur.com/5Ox7i.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5Ox7i.png" alt="enter image description here"></a></p>