Docker desktop for windows -v permission denied when writing to host volume from linux container

I am running docker Desktop version on Windows 10 Pro

When I try to run -> docker run -d -v c:/Users/data:/data alpine sleep 240
and then exec an ash session in the container
when I try to copy files from within the container to the /data directory, I get a permission denied error.

If on my desktop (running Windows Pro) I add files to c:/Users/data – I am able to see them in the container /data directory

The C;/Users/data directory is shared with Everyone (read write etc…)

How can I write to the volume from within the Alpine container?

1 Like