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

Calvin's Avatar


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.

    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


? 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