title: Can't change the permissions of files/folders on a volume with Docker windows
body: <p>I tried to change the permissions of files/folders on a volume with Docker windows.  But the permissions are not changed, unexpectedly.</p>
  
  <p>Environment:
  Host: Windows 10 Pro
  Docker version 17.09.0-ce, build afdb6d4</p>
  
  <p>Step to reproduce:</p>
  
  <ol>
  <li>Build a image with the Dockerfile below.</li>
  <li>Run a container with a volume.</li>
  <li>Change the permissions of files/folders.</li>
  </ol>
  
  <p>Dockerfile:</p>
  
  <pre><code>FROM microsoft/windowsservercore
  CMD [ "powershell" ]
  </code></pre>
  
  <p>Outputs:</p>
  
  <pre><code>D:\data\docker\sample&gt;docker build -t sample .
  Sending build context to Docker daemon  1.272GB
  Step 1/2 : FROM microsoft/windowsservercore
   ---&gt; 2cddde20d95d
  Step 2/2 : CMD powershell
   ---&gt; Running in dd207fe8b262
   ---&gt; e0203df155cd
  Removing intermediate container dd207fe8b262
  Successfully built e0203df155cd
  Successfully tagged sample:latest
  
  D:\data\docker\sample&gt;docker run -d --name sample --mount type=volume,source=sample_volume,target=C:/data sample ping -t localhost
  5a21f41d63de321e912ec3b99010a062d2e04d5f99145c6cd8bf649d3fbbebf1
  
  D:\data\docker\sample&gt;docker exec -i sample cmd
  Microsoft Windows [Version 10.0.14393]
  (c) 2016 Microsoft Corporation. All rights reserved.
  
  C:\&gt;cd c:\data
  cd c:\data
  
  c:\data&gt;MKDIR foo
  MKDIR foo
  
  c:\data&gt;ECHO hoge &gt; foo\hoge.txt
  ECHO hoge &gt; foo\hoge.txt
  
  c:\data&gt;cacls foo
  cacls foo
  c:\data\foo NT AUTHORITY\SYSTEM:(OI)(CI)(ID)F
              BUILTIN\Administrators:(OI)(CI)(ID)F
              CREATOR OWNER:(OI)(CI)(IO)(ID)F
              BUILTIN\Users:(OI)(CI)(ID)R
              BUILTIN\Users:(CI)(ID)(special access:)
                                    FILE_WRITE_DATA
                                    FILE_APPEND_DATA
                                    FILE_WRITE_EA
                                    FILE_WRITE_ATTRIBUTES
  
  
  
  c:\data&gt;cacls foo\hoge.txt
  cacls foo\hoge.txt
  c:\data\foo\hoge.txt NT AUTHORITY\SYSTEM:(ID)F
                       BUILTIN\Administrators:(ID)F
                       BUILTIN\Users:(ID)R
  
  
  c:\data&gt;cacls foo /T /E /G everyone:F
  cacls foo /T /E /G everyone:F
  processed dir: c:\data\foo
  processed file: c:\data\foo\hoge.txt
  
  c:\data&gt;cacls foo
  cacls foo
  c:\data\foo NT AUTHORITY\SYSTEM:(OI)(CI)(ID)F
              BUILTIN\Administrators:(OI)(CI)(ID)F
              CREATOR OWNER:(OI)(CI)(IO)(ID)F
              BUILTIN\Users:(OI)(CI)(ID)R
              BUILTIN\Users:(CI)(ID)(special access:)
                                    FILE_WRITE_DATA
                                    FILE_APPEND_DATA
                                    FILE_WRITE_EA
                                    FILE_WRITE_ATTRIBUTES
  
  
  
  c:\data&gt;cacls foo\hoge.txt
  cacls foo\hoge.txt
  c:\data\foo\hoge.txt NT AUTHORITY\SYSTEM:(ID)F
                       BUILTIN\Administrators:(ID)F
                       BUILTIN\Users:(ID)R
  </code></pre>
  
  <p>I found a document which says that the permissions of files/folders on volumes cannot be changed on Linux containers.  But I could not found documentation about Windows containers.  Does Windows containers support the permission changes of file/folders on a volume <strong>on Windows containers</strong>?</p>
  
  <p>Link:</p>
  
  <ul>
  <li>Logs and troubleshooting | Docker Documentation <a href="https://docs.docker.com/docker-for-windows/troubleshoot/#permissions-errors-on-data-directories-for-shared-volumes" rel="nofollow noreferrer">https://docs.docker.com/docker-for-windows/troubleshoot/#permissions-errors-on-data-directories-for-shared-volumes</a></li>
  </ul>