title: permission denied in containers after moving docker home
body: <p>Initially docker files system was located in /var/lib/docker
    Everything was working fine,But due to some space constrain ,We had to 
    move to /Proj/docker &amp; docker service is running.</p>
  
  <p><code>Active: active (running) since Thu 2019-03-28 09:36:59 UTC; 22h ago
       Docs: https://docs.docker.com
   Main PID: 27007 (dockerd)
      Tasks: 27
     Memory: 726.5M
     CGroup: /system.slice/docker.service
             └─27007 /usr/bin/dockerd --selinux-enabled -g /Proj/docker</code></p>
  
  <p>But after that , I am getting permission denied </p>
  
  <pre><code>  [user@host]# sudo docker run  -it oraclelinux:7-slim bash
   bash-4.2# ls
    ls: cannot open directory : Permission denied
  
  **unless I am running  with privilage flag set to true** 
  
    [user@host]# sudo docker run  -it --privileged=true  oraclelinux:7-slim bash
   bash-4.2# ls
  bin  boot  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var
  
  Can you please help to resolve this  
  </code></pre>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>please find additional info
  
  [user@host ~]$ systemctl status docker
  ● docker.service - Docker Application Container Engine
     Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
    Drop-In: /etc/systemd/system/docker.service.d
             └─docker-sysconfig.conf, https-proxy.conf
     Active: active (running) since Thu 2019-03-28 09:36:59 UTC; 1 day 2h ago
       Docs: https://docs.docker.com
   Main PID: 27007 (dockerd)
      Tasks: 27
     Memory: 726.9M
     CGroup: /system.slice/docker.service
             └─27007 /usr/bin/dockerd --selinux-enabled -g /Proj/docker
  
       
  
  
  [user@host ~]$ cat /etc/systemd/system/docker.service.d/docker-sysconfig.conf
  [Service]
  ExecStart=
  EnvironmentFile=-/etc/sysconfig/docker
  EnvironmentFile=-/etc/sysconfig/docker-storage
  EnvironmentFile=-/etc/sysconfig/docker-network
  ExecStart=/usr/bin/dockerd \
            $OPTIONS \
            $DOCKER_STORAGE_OPTIONS \
            $DOCKER_NETWORK_OPTIONS \
            $INSECURE_REGISTRY \
            -g /Proj/docker
      
      
  [user@host ~]$ cat /etc/systemd/system/docker.service.d/https-proxy.conf
  [Service]
  Environment="HTTPS_PROXY=http://proxyip:port"
  
  
  
  [user@host~]# ls -lrth /Proj/docker
  total 56K
  drwx------.  4 root root 4.0K Mar 22 07:42 plugins
  drwx------.  3 root root 4.0K Mar 22 07:42 image
  drwx------.  2 root root 4.0K Mar 22 07:42 volumes
  drwx------.  2 root root 4.0K Mar 22 07:42 trust
  drwxr-x---.  3 root root 4.0K Mar 22 07:42 network
  drwx------.  2 root root 4.0K Mar 22 07:42 swarm
  drwx------.  2 root root 4.0K Mar 22 07:42 builder
  drwx------.  4 root root 4.0K Mar 22 07:42 buildkit
  drwx------.  2 root root 4.0K Mar 28 09:36 runtimes
  drwx------.  2 root root 4.0K Mar 28 13:02 tmp
  drwx------. 33 root root  12K Mar 29 07:45 overlay2
  drwx------.  6 root root 4.0K Mar 29 07:45 containers</code></pre>
  </div>
  </div>
  </p>