I'm trying to install Docker Desktop on Windows, but after downloading the installer and creating an account, I get this error: "C:ProgramDataDockerDesktop must be owned by an elevated account." I'm already using a built-in Administrator account and have tried several installation attempts without success. What's the safest way to fix the folder permissions and complete the installation?
3 Answers
You can repair the ownership from an elevated Command Prompt. Open Command Prompt as administrator and run: `takeown /F "C:ProgramDataDockerDesktop" /A /R` followed by `icacls "C:ProgramDataDockerDesktop" /grant Administrators:F /T /C`. Then run the installer again as administrator. The group name may differ on a non-English Windows installation.
If the folder already exists, close the installer and delete C:ProgramDataDockerDesktop. Then right-click the Docker Desktop installer and choose “Run as administrator.” The folder may be left over from an earlier installation, and removing it before starting again usually lets the installer recreate it with the correct ownership.
This seems to be the most reliable fix. I had already tried a fresh install, but deleting the existing folder and launching the installer manually as administrator made a difference.
Another option is to open PowerShell as administrator and create the missing directory with `New-Item -ItemType Directory -Path "C:ProgramDataDockerDesktop" -Force`, then retry the installation. If the directory contains remnants from an older installation, remove those first. Also check whether antivirus or other security software is blocking changes under ProgramData.
I’ll check the security software as well. The issue may be related to an existing folder or a recent Windows update rather than my account not actually having administrator privileges.

The ownership commands fixed it for me when deleting the folder alone didn’t work.