E_ACCESSDENIED when trying to install new distro
Version
Microsoft Windows [Version 10.0.19045.2311]
WSL Version
- [X] WSL 2
- [ ] WSL 1
Kernel Version
5.15.74.2
Distro Version
No response
Other Software
No response
Repro Steps
Anytime I try to install a distro, for example, Ubuntu it fails with: Installing: Ubuntu Access is denied. =========90.0%===================== ] Error code: Wsl/InstallDistro/E_ACCESSDENIED
If I do it through the Microsoft Store I get: Code: 0x80070005
I removed an Ubuntu instance before this started happening because I used it as a temporary instance to tinker around.
Expected Behavior
The distro should install.
Actual Behavior
Installing: Ubuntu Access is denied. =========90.0%===================== ] Error code: Wsl/InstallDistro/E_ACCESSDENIED
If I do it through the Microsoft Store I get: Code: 0x80070005
Diagnostic Logs
Same issue. As a matter of fact, on three different physical computers using a couple of different versions of Windows Pro, there hasn't been a single time when I've installed WSL and used it heavily where it hasn't stopped working for some reason or another and usually a fix isn't easy.
It is also never apparent as to why it happened or what caused it and personally I have found determining that to be problematic at best.
When it comes to this particular error (Error code: Wsl/InstallDistro/E_ACCESSDENIED) I am unable to import a previously exported instance of a distro via powershell and running as admin. This seems to me to be a WSL/Host-OS issue and maybe hardware issues combined rather than an issue specifically with WSL alone.
In every case and trying to solve various other errors that produce similar results with WSL/WSL2 including this particular one, the only solution I've seen that works is to refresh the system or reinstall the system.
That is not a viable option due to how much software I have to reinstall and configure in order to get my system up to speed in order to produce the results I expect. WSL/WSL2 is awesome when it works as it is supposed to, but all things considered in my personal experiences with it, it hasn't been dependable/reliable for any notable length of time.
+1
I managed to fix this. The underlying problem was that the Microsoft Store was unable to install anything it seems. I have fixed this by following the third solution here: https://answers.microsoft.com/en-us/windows/forum/all/0x80070005-cant-download-or-update-any-app-from/1629e23b-6332-4cb0-ad12-1b1fc12e01a1
In case this link is ever dead: Solution 3 Reinstall the Microsoft Store.
- Right-click on Start.
- Click on Windows PowerShell(admin)
- Type: Get-AppXPackage -allusers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"} and press ENTER.
- Reboot your pc and try open the Microsoft Store.
Download the distros from the web with --web-download. Easy!