Docker Desktop install fails because C:ProgramDataDockerDesktop has the wrong owner

0
3
Asked By MellowPine47 On

I'm trying to install Docker Desktop on Windows 11 Pro, but the installer stops with this message: "For security reasons C:ProgramDataDockerDesktop must be owned by an elevated account." I already changed the folder owner to Administrators, and the installer is being launched with UAC elevation. What is the correct way to fix the folder or complete the installation?

3 Answers

Answered By NorthFox_62 On

The most reliable fix was to remove the existing DockerDesktop folder and recreate it with elevated PowerShell. Open PowerShell as administrator and run:

Remove-Item -Recurse -Force "C:ProgramDataDockerDesktop"
New-Item -ItemType Directory -Path "C:ProgramDataDockerDesktop"

Then launch the Docker installer directly with administrator privileges. If the folder cannot be removed normally, the forced recursive deletion from administrator PowerShell may be necessary.

QuietHarbor31 -

Deleting it through File Explorer did not work for me, but the forced removal command in an elevated PowerShell finally unlocked the installation.

Answered By SilverMaple5 On

If the folder was created by an earlier failed install, delete C:ProgramDataDockerDesktop first. Then open an administrator PowerShell, navigate to the folder containing the installer, and run it with:

Start-Process "Docker Desktop Installer.exe" -Wait install

Make sure the filename matches the actual installer name. Running the installer this way is important; simply approving the UAC prompt after launching it normally may leave the folder owned by the wrong account.

AmberKite29 -

I had the same issue on a new Windows installation. Removing the old folder and starting the installer from an elevated PowerShell fixed it.

Answered By BrightCedar8 On

Open File Explorer and enable Hidden items, then go to C:ProgramData. Right-click DockerDesktop, choose Properties > Security > Advanced, and change the owner to the Administrators group. Enable “Replace owner on subcontainers and objects,” apply the change, and run the Docker installer again with “Run as administrator.” This worked even on fresh Windows 11 installations.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.