Permission denied when attempting to write to bind mount in D:

Calvin's Avatar

Calvin

05 Aug, 2019 05:13 PM

Hi, I have a few Linux containers on Windows Server 2019 which bind mounts a folder in the D: drive. I am able to read from it, but gets a System.UnauthorizedAccessException when attempting to write/overwrite a file to it. Is this a known / expected behavior? If it is, is there any way that permissions can be changed for the Docker containers to write to it?

  1. 1 Posted by Ilya Finkelshte... on 06 Aug, 2019 02:25 AM

    Ilya Finkelshteyn's Avatar

    Can you please update ACL on the folder, e.g.

    Switch-DockerLinux
    mkdir D:\host | Out-Null
    icacls D:\host\ /grant "everyone:(OI)(CI)M"
    docker run --rm -v D:/host:/host busybox touch /host/sample.txt
    

    Please let us know if this works for you and if not, please help us with a repro scenario.

  2. 2 Posted by Calvin on 06 Aug, 2019 04:45 AM

    Calvin's Avatar

    Yup, that worked great, thanks!

  3. Owen McDonnell closed this discussion on 06 Aug, 2019 02:06 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

09 Jul, 2026 04:35 PM
07 Jul, 2026 07:22 PM
30 Jun, 2026 08:51 PM
26 Jun, 2026 03:33 PM
25 Jun, 2026 12:31 AM

 

05 Jun, 2026 07:28 PM
29 May, 2026 02:17 PM
28 May, 2026 06:46 PM
21 May, 2026 04:32 AM
12 May, 2026 05:50 PM
12 May, 2026 04:16 PM