Skip to content
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

Unable to share drive #2946

Closed
nimbusparis opened this issue Nov 22, 2018 · 31 comments
Closed

Unable to share drive #2946

nimbusparis opened this issue Nov 22, 2018 · 31 comments

Comments

@nimbusparis
Copy link

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.

@anniekuramoto
Copy link

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.

@vbhayden
Copy link

vbhayden commented Nov 30, 2018

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.

@higkoo
Copy link

higkoo commented Dec 5, 2018

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

@EAbychkov
Copy link

Same issue: any updates?

@drhoads
Copy link

drhoads commented Dec 29, 2018

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.

@itsgk92
Copy link

itsgk92 commented Jan 4, 2019

+1

@djadamsikora
Copy link

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.

@shurale85
Copy link

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

@bbDSA
Copy link

bbDSA commented Jan 25, 2019

+1

@Alwandy
Copy link

Alwandy commented Feb 1, 2019

Same issue, any update??

@drhoads
Copy link

drhoads commented Feb 1, 2019

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.

@dadaxr
Copy link

dadaxr commented Feb 4, 2019

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

@FBoucher
Copy link

FBoucher commented Feb 6, 2019

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/

@liuning0820
Copy link

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

@Iamzz-cn
Copy link

+1

@jyothishavolin
Copy link

it worked for me

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

@dk-jessn
Copy link

dk-jessn commented May 6, 2019

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

@clor09
Copy link

clor09 commented Jun 12, 2019

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

@PasiJarnstedt
Copy link

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!

@LeeRuns
Copy link

LeeRuns commented Jul 17, 2019

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

@BaraaSoft
Copy link

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.

@liuzhejun
Copy link

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

@sudomkdirjs
Copy link

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.

@jh-lau
Copy link

jh-lau commented Nov 18, 2019

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!

@GuillaumeLab
Copy link

tried everything nothing worked for me

@mat007
Copy link
Member

mat007 commented Dec 19, 2019

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)

@GuillaumeLab
Copy link

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 !

@SylvSylv
Copy link

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
Copy link

swebs commented Feb 6, 2020

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?

@stephen-turner
Copy link
Contributor

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

@docker-robott
Copy link
Collaborator

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

@docker docker locked and limited conversation to collaborators Jul 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests