title: In Docker for Windows, permissions denied for mkdir/chown
body: <p>I'm working on developing a ghost blog and deploying it as a docker container. Since one of the goals of my project is to develop themes and other things with live data, I've created a volume mount for the /var/lib/ghost directory as suggested by the ghost docker image. </p>
  
  <p>The ghost docker image mounts the drive fine, but when it tries to chown the file, it gets a permission denied error. I'm running the Creator update of Windows 10, and the latest Docker for Windows (ie, Windows 10 Pro versin 1703, and Docker version 17.03.1-ce-win5)</p>
  
  <p>As a test, I followed this procedure, at both home and work (where I'm on the previous version of windows 10):</p>
  
  <ol>
  <li>Create a Project\site directory in C:\users\joe\</li>
  <li>Place the docker-compose.yml file below the directory:</li>
  <li>Run <code>docker-compose up</code></li>
  </ol>
  
  <p><em>docker-compose.yml</em></p>
  
  <blockquote>
  <pre><code>version: '3'
  services:
    blog:
      image: ghost
      volumes:
        - ./blog:/var/lib/ghost
      ports:
        - "2368:2368"
  </code></pre>
  </blockquote>
  
  <p>On my work machine, it creates the blog directory, and populates it with the themes and content as expected from a ghost blog.</p>
  
  <p>On my home machine, I get this error:</p>
  
  <blockquote>
    <p>ERROR: for blog  Cannot start service blog: error while creating mount source path '/C/Users/joe/Projects/site/blog': mkdir /C/Users/joe/Projects/site/blog: permission denied
    ERROR: Encountered errors while bringing up the project.</p>
  </blockquote>
  
  <p>if I make the directory myself, and run <code>docker-compose.yml</code> again, I get this error:</p>
  
  <blockquote>
    <p>blog_1  | chown: changing ownership of '/var/lib/ghost': Permission denied</p>
    
    <p>site_blog_1 exited with code 1</p>
  </blockquote>
  
  <p>Mounting directories definitely works, I've run the alpine ls /data example shown on the settings for shared drives in Docker for Windows.</p>
  
  <p>I've compared the settings in docker, on the virtual networks, on the directories between home and work -- the only differences I can find are because work is on a Domain, and has a different username, and that my version of windows is 1607.</p>
  
  <p>I don't know if this is a bug, a bad interaction between current windows &amp;&amp; docker, or something I've done wrong locally.  I admit I'm leaning toward the latter because I can find <em>no</em> documentation about this anywhere.</p>