title: Permission denied on accessing host directory in Docker
body: <p>I am trying to mount a host directory in Docker, but then I cannot access it from within the container, even if the access permissions look good.</p>
  <p>I am doing</p>
  <pre><code>sudo docker run -i -v /data1/Downloads:/Downloads ubuntu bash
  </code></pre>
  <p>and then</p>
  <pre><code>ls -al
  </code></pre>
  <p>It gives me:</p>
  <pre><code>total 8892
  drwxr-xr-x.  23 root root    4096 Jun 18 14:34 .
  drwxr-xr-x.  23 root root    4096 Jun 18 14:34 ..
  -rwxr-xr-x.   1 root root       0 Jun 18 14:34 .dockerenv
  -rwx------.   1 root root 9014486 Jun 17 22:09 .dockerinit
  drwxrwxr-x.  18 1000 1000   12288 Jun 16 11:40 Downloads
  drwxr-xr-x.   2 root root    4096 Jan 29 18:10 bin
  drwxr-xr-x.   2 root root    4096 Apr 19  2012 boot
  drwxr-xr-x.   4 root root     340 Jun 18 14:34 dev
  drwxr-xr-x.  56 root root    4096 Jun 18 14:34 etc
  drwxr-xr-x.   2 root root    4096 Apr 19  2012 home
  </code></pre>
  <p>and a lot more lines like that (I think this is the relevant portion).</p>
  <p>If I do</p>
  <pre><code>cd /Downloads
  ls
  </code></pre>
  <p>the result is</p>
  <pre><code>ls: cannot open directory .: Permission denied
  </code></pre>
  <p>The host is Fedora 20, with Docker 1.0.0 and go1.2.2.</p>
  <p>What is going wrong?</p>