docker/for-win

Docker for Windows - Access Denied

Closed this issue Β· 23 comments

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

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.

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.

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

Same.

Thanks!

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,

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.

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

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

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

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 commented

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

khteh commented

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.

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...

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.?

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!

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

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

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

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

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

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

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.

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