for-win icon indicating copy to clipboard operation
for-win copied to clipboard

Unable to share drive

Open nimbusparis opened this issue 8 years ago • 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.

nimbusparis avatar Nov 22 '18 16:11 nimbusparis

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.

anniekuramoto avatar Nov 28 '18 15:11 anniekuramoto

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.

vbhayden avatar Nov 30 '18 18:11 vbhayden

  • [ 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

higkoo avatar Dec 05 '18 08:12 higkoo

Same issue: any updates?

EAbychkov avatar Dec 24 '18 09:12 EAbychkov

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 https://github.com/docker/for-win/issues/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.

drhoads avatar Dec 29 '18 12:12 drhoads

+1

itsgk92 avatar Jan 04 '19 13:01 itsgk92

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.

djadamsikora avatar Jan 08 '19 16:01 djadamsikora

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

shurale85 avatar Jan 18 '19 16:01 shurale85

+1

bbDSA avatar Jan 25 '19 15:01 bbDSA

Same issue, any update??

Alwandy avatar Feb 01 '19 16:02 Alwandy

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.

drhoads avatar Feb 01 '19 16:02 drhoads

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

dadaxr avatar Feb 04 '19 10:02 dadaxr

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/

fboucher avatar Feb 06 '19 14:02 fboucher

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

liuning0820 avatar Feb 26 '19 04:02 liuning0820

+1

Iamzz-cn avatar Mar 21 '19 10:03 Iamzz-cn

it worked for me

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

jyothishavolin avatar Apr 28 '19 08:04 jyothishavolin

Please help me here: https://github.com/docker/compose/issues/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

dk-jessn avatar May 06 '19 16:05 dk-jessn

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

clor09 avatar Jun 12 '19 04:06 clor09

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!

PasiJarnstedt avatar Jun 13 '19 07:06 PasiJarnstedt

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:)

LeeRuns avatar Jul 17 '19 14:07 LeeRuns