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

Docker for Windows - Access Denied #868

Closed
hmarcelodn opened this issue Jun 29, 2017 · 23 comments
Closed

Docker for Windows - Access Denied #868

hmarcelodn opened this issue Jun 29, 2017 · 23 comments

Comments

@hmarcelodn
Copy link

@hmarcelodn hmarcelodn commented Jun 29, 2017

Expected behavior

Start Docker Daemon

Actual behavior

I am receiving a message saying:

You are not allowed to use Docker . You must be in the "docker-users" group.

Information

  • SO: Windows 10 Pro
  • Docker Version: Docker version 17.06.0-ce, build 02c1d87

Steps to reproduce the behavior

  1. Install Docker
  2. Open Docker for Windows
@jasonbivins
Copy link

@jasonbivins jasonbivins commented Jun 29, 2017

Hi @hmarcelodn
Have you restarted your machine after installing docker? There were some security changes in the new version, and you might need to log off or restart for the to take effect.

@Surgeonito
Copy link

@Surgeonito Surgeonito commented Jul 3, 2017

Same here.

Docker version: 17.06.0-ce-win18 (12627)
OS: Win 10Pro

One note more: when I launch Docker for Windows as Administrator - all is up and running, but I lost settings as if I was running for a new user.

@Surgeonito
Copy link

@Surgeonito Surgeonito commented Jul 3, 2017

Got that finally working. Just add yourself to 'docker-users' group in Computer management.

@hmarcelodn
Copy link
Author

@hmarcelodn hmarcelodn commented Jul 3, 2017

Same.

Thanks!

@hmarcelodn hmarcelodn closed this Jul 3, 2017
@salasxjl
Copy link

@salasxjl salasxjl commented Aug 1, 2017

My ID was already in the 'docker-users' group but there is a note there on the Computer management tool saying that I need to log in again in order to take effect,

I am going to log off and try again,

@imransdq
Copy link

@imransdq imransdq commented Dec 17, 2017

You need to add your logon account to Windows group, docker-users. Docker for Window will create this group automatically when docker for Windows is installed.

Steps:

  1. Logon to Windows as Administrator
  2. Go to Windows Administrator Tools
  3. Look for Windows Computer Management and click on it.
  4. Or you can skip steps 1, right mouse clicking Computer Management, go to more, and select run as administrator and provide Administrator password.
  5. Double click docker-users group and add your account as member.
  6. Also add your account to Hyper-V Administrator. This was added when you installed docker for Windows.
  7. Log off from Windows and log back on.
  8. Click on Windows icon on bottom left and start Docker for Windows. This will start docker windows service.
    9 Start Windows Powershell and type docker --version. It will show Docker version 17.09.1-ce, build 19e2cf6. This is the latest version.

You are good to go. Now just follow docker getting started to configure docker daemon.

@jregeimbal
Copy link

@jregeimbal jregeimbal commented Jan 14, 2018

I just ran into this while trying to upgrade to 17.12.0-ce-win47. That's what I get for clicking the nice pretty upgrade button. Now, my user is already in the docker-users group. Yet, I can't delete the Docker folder.. quite maddening. Time to dig through Windows security BS to get this fixed.

Access to the path 'C:\Program Files\Docker\Docker\Bugsnag.dll' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
   at LightweightInstaller.UnpackArtifactsStep.<DoAsync>d__23.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at LightweightInstaller.InstallWorkflow.<HandleD4WPackage>d__19.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at LightweightInstaller.InstallWorkflow.<ProcessAsync>d__18.MoveNext()

@garyfeng
Copy link

@garyfeng garyfeng commented Jan 27, 2018

same issue with 17.12.0-ce-win47. Resolved following @imransdq above; turns out that I was not in the Hyper-V Administrator group

@liquidboy
Copy link

@liquidboy liquidboy commented Feb 2, 2018

i've got into this situation many times .. such BS ... also got into jregemibal's situation and had a folder that was undeletable (needed to go into startup mode console and delete the folder)..

@MrHinsh
Copy link

@MrHinsh MrHinsh commented Apr 20, 2018

OK, so I am unable to add my user account to the "docker-users" group as it does not exist. I have an Azure AD joined machine.

image

I have run
C:\WINDOWS\system32>net localgroup docker-users AzureAD\MartinHinshelwoodnkd /add
The command completed successfully.

But this did not work...

image

I can confirm that my account is in the "docker-users" group, but I get the same Access Denied message. Also with elevation.

@khteh
Copy link

@khteh khteh commented Jul 21, 2018

Docker version 18.03.1-ce, build 9ee9f40 still has the issue. All users are added to docker-users group!!!

@khteh
Copy link

@khteh khteh commented Jul 23, 2018

Resolved. I must login to active directory and add myself into docker-users group. I was using local account and that's why it failed.

@owlSpeed
Copy link

@owlSpeed owlSpeed commented Jul 25, 2018

I tried adding both myself and Admin to Active Directory, still receiving:
'You are not allowed to use Docker . You must be in the "docker-users" group.'
Also receiving:
'error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.38/version: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.' even when running PS in elevated...

@emzyme20
Copy link

@emzyme20 emzyme20 commented Jun 28, 2019

I have a Windows image with docker installed and configured to run on windows start up. My issue occurs when team city spins up a VM instance off of the image that contains docker. As part of this process team city creates a new user account to access the instance. When docker runs on start up I get the error that this new user is not part of the docker-users group. Is there a way to configure my image that knows about docker to say that any new users created should have the ability to run docker.?

@lehmus
Copy link

@lehmus lehmus commented Jul 17, 2019

I have run
C:\WINDOWS\system32>net localgroup docker-users AzureAD\MartinHinshelwoodnkd /add
The command completed successfully.

Thanks for the tip! I have an Azure AD joined machine running Windows 10 Pro. But when I tried to add myself to the docker-users group through Computer Management, it only saw my local computer in the domain list, and did not accept my username in the form AzureAD\MyUsername, because it did not recognize the AzureAD domain. For some strange reason, I was able to add myself to the docker-users group by running the above command in an elevated command prompt. After restarting the computer, I was able to start Docker successfully. Awesome!

@ShvetsovZE
Copy link

@ShvetsovZE ShvetsovZE commented Oct 9, 2019

Got that finally working. Just add yourself to 'docker-users' group in Computer management.

If by any reason Computer Management UI could not find your AzureAD account here is a script to whick helped me to add myself to the group net localgroup docker-users AzureAD\[UserName] /add

@Ather23
Copy link

@Ather23 Ather23 commented Nov 28, 2019

In case a windows home user stumbles upon this article. The solutions in this thread are for windows Pro users and it does not come with Computer Management UI.
You can, however, use the following powershell commands to get this working.
New-LocalGroup -Name 'docker-users' -Description 'docker Users Group' Add-LocalGroupMember -Group 'Administrators' -Member ('docker-users') –Verbose Add-LocalGroupMember -Group 'docker-users' -Member ('{INSERT YOUR USERNAME HERE}','Administrators') –Verbose

@priyag597
Copy link

@priyag597 priyag597 commented Dec 17, 2019

4. Or you can skip steps 1, right mouse clicking Computer Management, go to more, and select run as administrator and provide Administrator password.

I am also facing same issues on windows. I had follow till 4 setup . but I am unable to find docker user group in window how do I add user group .pls help me out

@user-name-is-taken
Copy link

@user-name-is-taken user-name-is-taken commented May 29, 2020

With windows 2004 coming out, docker can be run on windows 10 home through wsl 2. Unfortunately, computer management doesn't allow you to manage user groups in windows 10 home. To get around this you can add your user to the docker-users group with:

net localgroup "docker-users" "<your username>" /add

@Wageesha95
Copy link

@Wageesha95 Wageesha95 commented Jun 18, 2020

With windows 2004 coming out, docker can be run on windows 10 home through wsl 2. Unfortunately, computer management doesn't allow you to manage user groups in windows 10 home. To get around this you can add your user to the docker-users group with:

net localgroup "docker-users" "<your username>" /add

Thank you. It works for me

@edcu11
Copy link

@edcu11 edcu11 commented Jul 6, 2020

Just as a side note: I ran into this issue last week (7/4/2020), updating docker worked for me.

@Wolfium
Copy link

@Wolfium Wolfium commented Jul 29, 2020

Hi @hmarcelodn
Have you restarted your machine after installing docker? There were some security changes in the new version, and you might need to log off or restart for the to take effect.

Thanks for the tip, I ended in this issue why installing using Chocolatey package manager, doing all by scripting it does show the alert message saying that you need to logout and login neither to restart the machine as it was shown installing manually from the web download.

Hope this helps someone else.

@docker-desktop-robot
Copy link
Collaborator

@docker-desktop-robot docker-desktop-robot commented Aug 28, 2020

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 Aug 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet