-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when mounting host path with Docker for Windows - "Permission Denied" #3385
Comments
Same problem here. |
Same here. |
Also have this problem. Creates volumes fine once you add the local account, the container just cant access them. Doesn't seem matter what rights I put on the .docker folder either for the new account user. Also see "Error response from daemon: error while creating mount source path '/host_mnt/c/Users//.docker/Volumes/elasticdata-elasticsearch-0/pvc-64d22745-7883-11e9-9d67-00155d021b09': mkdir /host_mnt/c/Users//.docker: permission denied" when inspecting the pod. File exists in the user directory and no issue with volumes themselves it seems. Tried unsuccessfully to find a way to change the directory for these volumes to somewhere I would have more control as having them on another drive would be useful also. |
The solution seems to be to add the Users group to the .docker folder and grant full access. Just the new local account access wasn't enough for me. |
@DarrenV79 could you please explain in more details how to add Users group to .docker folder and grant full access? thanks in advance |
@daton89 To add a group to a directory you in windows follow these steps:
With all that out of the way I will report that adding the "Users" group to just the .docker file in my What did work was having the Users group added to at least the .docker, the great great great grandparent dir of my working dir, and the local dir I was trying to mount to my container. |
Same problem... Trying to give access to users... |
@freerider7777 were you able to resolve your issue? |
@alexkoepke Yes, I gave permissions from @DarrenV79's workaround and it worked |
@alexkoepke this solved it for me as well |
@DarrenV79 's answer solved my issue as well. |
Giving full permissions only to the .docker folder didn't seem to work for me. Giving full permissions to the entire User folder seemed to do the trick, even though it is nasty. My setup is as follows:
The steps I took were:
Still unsure which folders in particular it needs permissions to read/write to though from Users/User but it worked... |
Yes its ridiculously nasty as multiple people can use my work machine and then has access to some of my keys. Ideally for me I want to be able to change the default directory. This is also useful because my C: is fairly small but I don't seem to be able to find any information on how to do that. |
You only give full access to the user running docker, not to everyone. As long as you keep the docker user's credentials secret you should be fine, but it still kinda defeats the purpose of creating a separate user for docker in the first place. |
Step 02: @alexkoepke Solution. His sequence works perfectly form me |
@PauloPortfolio see my answer. This only partially fixes it. At least when running K8s. Basically it creates the volume, it just fails to mount. |
The solution tedchirvasiu posted on September 19th worked for me! Thanks!!! |
Hi, I gave access for users to D:/Server/Pi-Hole and the .docker folder. Thanks, D:\server\pi-hole> docker run -d --name pihole -p 53:53/tcp -p 53:53/udp -p 80:80 -p 443:443 -v "/d/Server/Pi-Hole/:/etc/pihole/" -v "/d/Server/Pi-Hole/dnsmasq.d/:/etc/dnsmasq.d/" -e ServerIP="192.168.0.10" -e WEBPASSWORD=admin --restart=unless-stopped pi-hole/pi-hole:latest C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: Mount denied: |
> net user /add DockerDiskSharing DockerDiskSharing
> net localgroup Administrators DockerDiskSharing /add
> net localgroup docker-users DockerDiskSharing /add
> icacls "%UserProfile%" /q /c /t /grant docker-users:F
|
Just resetting credentials as @abraaoz mentioned worked for me well. |
Issues go stale after 90d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
This is still a big issue, and it seems the ability to reset credentials has been removed from the GUI. |
@secbug there is no need for credentials anymore as the file sharing doesn’t use Samba anymore. I’ll go ahead and close this issue, could you please open one describing the problem you’re having? |
Closed issues are locked after 30 days of inactivity. If you have found a problem that seems similar to this, please open a new issue. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
Expected behavior
I'm not able to do a docker run … I get the error below. I'm trying to run a Linux container on Windows 10.
error while creating mount source path '/host_mnt/c/Users/xyz/AppData/Roaming/Microsoft/UserSecrets': mkdir /host_mnt/c/Users/xyz/AppData: permission denied.
Actual behavior
Run the container successfully
Information
I checked the Drive sharing config and Drive sharing is enabled with credentials that have local admin rights on my machine.
Steps to reproduce the behavior
The text was updated successfully, but these errors were encountered: