docker/for-win

Unable to share drive

Closed this issue Β· 31 comments

When trying to share C drive, the appl ask me credential then come back to the screen without sharing anything.
When using powershell (admin mode) I got this error:
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: Drive sharing failed for an unknown reason.
Diag ID : 19034650-8E87-44CB-827D-361F6620673A/20181122173823

I've tried to disable firewall without success.

I am also seeing the same issue - same error message and here's my
Diagnostic ID: 32499C52-22D2-44B1-BBD6-025ADAB377AC/20181128074329

> docker run --rm -v c:/Users:/data alpine ls /data
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: Drive sharing failed for an unknown reason.

Same problem, even if I allow sharing on the C drive through windows explorer.

After enabling C drive sharing through windows and submitting the Docker credential popup, I get the Drive sharing failed for an unknown reason and the C drive sharing is now disabled in windows.

  • [ Stable ] I have tried with the latest version of my channel (Stable or Edge)
  • [ Yes ] I have uploaded Diagnostics
  • Diagnostics ID: 9CD2F59F-7D3C-416A-993C-2B0A74F46995/20181205154030

Expected behavior

  • Mount shared drives.

Actual behavior

  • docker.exe Error response from daemon Drive sharing failed for an unknown reason.

Information

  • Windows Version:
  • Docker for Windows Version:

Steps to reproduce the behavior

  1. Docker --> Settings.
  2. Chose D to share for example( drive C is the same).
  3. Input OS passwords.
  4. Then docker restarted.
  5. But D is also not shared.

log.txt

[15:48:19.144][SambaShare ][Error ] Unable to mount D drive: 10.22.33.1 (10.22.33.1:445) open
rm: cannot remove '/d': No such file or directory
rm: cannot remove '/D': No such file or directory
umount: /host_mnt/d: not mounted.
mount.cifs kernel mount options:
ip=10.22.33.1,unc=\10.22.33.1\D,noperm,iocharset=utf8,dir_mode=0777,nobrl,mfsymlinks,vers=3.02,sec=ntlmsspi,user=higkoo,domain=BILIOPS,pass=********
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) `

My Env

Microsoft Windows [Version 10.0.17134.407]
Client: Docker Engine - Community
Version: 18.09.0
API version: 1.39
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:47:51 2018
OS/Arch: windows/amd64
Experimental: false

Server: Docker Engine - Community
Engine:
Version: 18.09.0
API version: 1.39 (minimum version 1.12)
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:55:00 2018
OS/Arch: linux/amd64
Experimental: false

Same issue: any updates?

The solution for me was to really delve into some of the documentation. For my instance I could not share folders on my Windows 10 machine with Dockers linux containers because I was using my Active Directory login credentials. You can’t use IDs that are authenticating to Azure AD
#1352
Only use local admins. I used my local login Admin and was able to get the share to work just fine. I ran into an issue of Docker not recognizing my local admin as another instance of me even though I used my docker signin. I had to uninstall Docker for Windows and then reinstall under my local admin user. Hope this helps.

+1

I used my windows pin when entering credentials, which did not throw an error, but did not work.
I then used my full windows password and it worked.

I am stacked with the same issue. And see no fix/workaround still

+1

Same issue, any update??

The solution for me was to log into the machine with a local admin ID (NOT a domain specific ID). That meant I had to set up that local admin ID as part of my Docker hub group. Then all the drive sharing worked.

problem temporary solved using docker 18.06.1-ce-win73 . next stable or edge versions are broken.

Adding the local user did fix the problem for me.
You can follow the instructions on Tom blog post here: https://tomssl.com/2018/01/11/sharing-your-c-drive-with-docker-for-windows-when-using-azure-active-directory-azuread-aad/

The solution for me: right click Computer ->choose "Management” -> Local User and Groups -> Groups
Find the Group "Hyper-V Administrators" and add your current login user into this group.
image

+1

it worked for me

Settings > Accounts > Your info
click 'Sign in with a local account instead' and set it up

Please help me here:
docker/compose#6688

  1. I do use An Azure AD account which has administrative privileges to the computer, which is a company policy or even constraint, but has also tried with local admin.
  2. Sharing the drive is possible by following Sharing your C drive with Docker for Windows
  3. I am unable to run docker-compose up -d
    PermissionError: [WinError 5] Access is denied
    [11064] Failed to execute script docker-compose

Thanks

hi, is there any fix for this? i tried all the solutions above, but none worked..

I had similar issue, and resolved it in following way.

My Setup:
Win10 Pro + Docker (18.09.2)
I use my AzureAd to login

My Project Directory C:\Users<Username>\source\repos\docker-symfony4

Solution:
Created local user 'DockerAdmin' and added it to Local Groups (Hyper-V-Administrators and docker-users)

Shared access to C with DockerAdmin / Pass.
After this stage Docker was complaining about directory rights.

Granted read/write/modify rights to C:\Users<Username>\source directory (and sub-folders etc).

Success!

for those of us who don't use azure????
@docker dev team can you please make a wiki in your documentation for this specifically and walk through cases like..

  • how to share all drive credentials between windows user and docker
  • how to share a specific drive creds/permission to docker on windows

please do each of these where

  • linux user is trying to mount windows based cifs by IP
  • windows user is trying to mount share / cifs by ip
    -- windows user is trygin to mount share/cifs by share name (ie D:)

The solution for me was to really delve into some of the documentation. For my instance I could not share folders on my Windows 10 machine with Dockers linux containers because I was using my Active Directory login credentials. You can’t use IDs that are authenticating to Azure AD
#1352
Only use local admins. I used my local login Admin and was able to get the share to work just fine. I ran into an issue of Docker not recognizing my local admin as another instance of me even though I used my docker signin. I had to uninstall Docker for Windows and then reinstall under my local admin user. Hope this helps.

you are right, I tried with local admin account and it work.

I tried all the methods provided above and it failed. But the following settings are valid for me.
415885-20181129110918546-1172477477

I had similar issue, and resolved it in following way.

My Setup:
Win10 Pro + Docker (18.09.2)
I use my AzureAd to login

My Project Directory C:\Users\source\repos\docker-symfony4

Solution:
Created local user 'DockerAdmin' and added it to Local Groups (Hyper-V-Administrators and docker-users)

Shared access to C with DockerAdmin / Pass.
After this stage Docker was complaining about directory rights.

Granted read/write/modify rights to C:\Users\source directory (and sub-folders etc).

Success!

This solution worked for me :). Thanks a lot.

I tried all the methods provided above and it failed. But the following settings are valid for me.
415885-20181129110918546-1172477477

Thanks a lot, this works for me!

tried everything nothing worked for me

Can you please try the latest Edge?
We have removed the need for a password for sharing drives and this will be available in Stable hopefully in January.

https://docs.docker.com/docker-for-windows/edge-release-notes/
(look for entries mentioning gRPC/FUSE for details)

Can you please try the latest Edge?
We have removed the need for a password for sharing drives and this will be available in Stable hopefully in January.

https://docs.docker.com/docker-for-windows/edge-release-notes/
(look for entries mentioning gRPC/FUSE for details)

It works well with the edge version yes, thanks !

Can you please try the latest Edge?
We have removed the need for a password for sharing drives and this will be available in Stable hopefully in January.

https://docs.docker.com/docker-for-windows/edge-release-notes/
(look for entries mentioning gRPC/FUSE for details)

I still had the problem even when logged in as local admin + security options for network access as local.

Worked with this edge version, thanks !

swebs commented

Does the Edge release allow you to share SMB shares mounted at drive letters? I.e. we don't need the docker-volume-netshare plugin anymore?

This is fixed with the new filesharing implementation in 2.2.0.3, so closing this ticket.

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

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.
/lifecycle locked