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

Error: 0x80070005 after installing on Win10 Skip Ahead build 17618 #3020

Closed
richlilly2004 opened this issue Mar 13, 2018 · 54 comments
Closed

Comments

@richlilly2004
Copy link

Installed the new Kali build yesterday and received the following, on a Skip Ahead Insider build:

Installing, this may take a few minutes...
Installation Failed!
Error: 0x80070005
Press any key to continue...

Also bash from PowerShell throws teh same

@benhillis
Copy link
Member

@chwarr
Copy link
Member

chwarr commented Apr 24, 2018

@benhillis, I believe I'm having the same problem. I've collected the ETL logs. Shall I attach them here, or do you want me to send them to you another way?

Problem: attempting to launch Ubuntu on Windows 10 Version 1803 (OS Build 17133.1) fails with "Error: 0x80070005".

Repro steps:

  1. ubuntu /clean
  2. Go to Apps in Setting and remove the Ubutnu app
  3. Visit https://aka.ms/wslstore
  4. Install Ubuntu
  5. From an admin command prompt, start the 3 logman.exe traces.
  6. From a non-elevated command prompt run ubuntu.
  7. Stop the three logman traces.

Expected results:

Prompted to set username and password.

Actual results:

C:\Users\chwarr>ubuntu
Installing, this may take a few minutes...
Installation Failed!
Error: 0x80070005
Press any key to continue...

@chwarr
Copy link
Member

chwarr commented Apr 25, 2018

Tickle. I have logs for the repro running ubuntu , but I need instructions for how to get them to you, as I believe they have PII inside of them. The contributing guide has instructions for security bugs and crash dumps, but not these log files. (I'm also a Microsoft employee and have this repro on a Microsoft machine if you need to get your hands on it.)

I also have a repro with logs trying to run kali.exe--which was never successfully installed on this machine--from both a non-elevated and elevated PowerShell prompt.

4/25/2018 1:07:14 AM :: chwarr@CHWARR-ZEN4 :: C:\src
  jobs: 1  [1] > get-command kali

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Application     kali.exe                                           0.0.0.0    C:\Users\chwarr\AppData\Local\Microsoft\WindowsApps\kali.exe


4/25/2018 1:07:14 AM :: chwarr@CHWARR-ZEN4 :: C:\src
  jobs: 1  [2] > kali
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80070005
Error: 0x80070005 Access is denied.

Press any key to continue...

@WSLUser
Copy link

WSLUser commented Apr 25, 2018

@chwarr, out of curiousity, did you try using wsl.exe under an elevated CMD/PS? If the appx is installed, some users have reported using this works around the issue and afterwards they can run distro.exe. Note that wsl.exe will launch your default distro. You'll need wslconfig.exe to change the default, in case you need to do the same thing for each distro.

@chwarr
Copy link
Member

chwarr commented Apr 25, 2018

wsl is reporting that there are no distros installed:

4/25/2018 3:01:45 PM :: chwarr@CHWARR-ZEN4 :: C:\src
  [5] # wslconfig /l
Windows Subsystem for Linux has no installed distributions.
Distributions can be installed by visiting the Microsoft Store:
https://aka.ms/wslstore
4/25/2018 3:01:48 PM :: chwarr@CHWARR-ZEN4 :: C:\src
  [6] # wsl
Windows Subsystem for Linux has no installed distributions.
Distributions can be installed by visiting the Microsoft Store:
https://aka.ms/wslstore
Press any key to continue...

@chwarr
Copy link
Member

chwarr commented Apr 26, 2018

Good suggestion, @Biswa96: elevated vs. unelevated doesn't appear to matter.

The run in my previous comment was unelevated.

Here's an elevated run:

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Loading personal and system profiles took 7398ms.
4/26/2018 12:02:13 PM :: chwarr@CHWARR-ZEN4 :: C:\src
  jobs: 1  [1] # get-command kali

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Application     kali.exe                                           0.0.0.0    C:\Users\chwarr\AppData\Local\Microsoft\WindowsApps\kali.exe


4/26/2018 12:02:23 PM :: chwarr@CHWARR-ZEN4 :: C:\src
  [2] # kali
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80070005
Error: 0x80070005 Access is denied.

Press any key to continue...
4/26/2018 12:02:28 PM :: chwarr@CHWARR-ZEN4 :: C:\src
  [3] # wsl
Windows Subsystem for Linux has no installed distributions.
Distributions can be installed by visiting the Microsoft Store:
https://aka.ms/wslstore
Press any key to continue...

@WSLUser
Copy link

WSLUser commented Apr 26, 2018

Shouldn't need to run elevated for extraction, very odd. Ok so just to verify this isn't a dupe/regression, how about restarting the LXSS service (if you even see it running). What would be ironic is if the issue is simply because all the Store apps updated to use the updated launcher from https://github.com/Microsoft/WSL-distrolauncher. Of course the only way to test that is to manually compile it yourself.

@chwarr
Copy link
Member

chwarr commented Apr 26, 2018

@DarthSpock: I found a service with short name "LxssManager". Restarting that doesn't fix the access denied error.

4/26/2018 2:43:15 PM :: chwarr@CHWARR-ZEN4 :: C:\src
  [9] # get-service -name LxssManager

Status   Name               DisplayName
------   ----               -----------
Running  LxssManager        LxssManager


4/26/2018 2:43:20 PM :: chwarr@CHWARR-ZEN4 :: C:\src
  [10] # Stop-Service -Name LxssManager
4/26/2018 2:43:28 PM :: chwarr@CHWARR-ZEN4 :: C:\src
  [11] # Start-Service -Name LxssManager
4/26/2018 2:43:36 PM :: chwarr@CHWARR-ZEN4 :: C:\src
  [12] # ubuntu
Installing, this may take a few minutes...
Installation Failed!
Error: 0x80070005
Press any key to continue...
4/26/2018 2:43:41 PM :: chwarr@CHWARR-ZEN4 :: C:\src
  [13] # kali
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80070005
Error: 0x80070005 Access is denied.

Press any key to continue...
4/26/2018 2:43:45 PM :: chwarr@CHWARR-ZEN4 :: C:\src
  [14] # get-service LxssManager

Status   Name               DisplayName
------   ----               -----------
Running  LxssManager        LxssManager

@chwarr
Copy link
Member

chwarr commented Apr 30, 2018

Just got force upgraded to OS Build 17134.1 and I'm still seeing this behavior.

My outstanding offer to send logs or get you access to the machine in question still stands: I just need to know how you'd like me to submit them.

4/30/2018 3:26:42 PM :: chwarr@CHWARR-ZEN4 :: C:\src
  jobs: 1  [1] # cmd /c ver

Microsoft Windows [Version 10.0.17134.1]
4/30/2018 3:28:16 PM :: chwarr@CHWARR-ZEN4 :: C:\src
  [2] # wsl
Windows Subsystem for Linux has no installed distributions.
Distributions can be installed by visiting the Microsoft Store:
https://aka.ms/wslstore
Press any key to continue...
4/30/2018 3:28:19 PM :: chwarr@CHWARR-ZEN4 :: C:\src
  [3] # ubuntu
Installing, this may take a few minutes...
Installation Failed!
Error: 0x80070005
Press any key to continue...
4/30/2018 3:28:22 PM :: chwarr@CHWARR-ZEN4 :: C:\src
  [4] # kali
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80070005
Error: 0x80070005 Access is denied.

Press any key to continue...
4/30/2018 3:28:24 PM :: chwarr@CHWARR-ZEN4 :: C:\src
  [5] # restart-service -name LxssManager
4/30/2018 3:28:31 PM :: chwarr@CHWARR-ZEN4 :: C:\src
  [6] # wsl
Windows Subsystem for Linux has no installed distributions.
Distributions can be installed by visiting the Microsoft Store:
https://aka.ms/wslstore
Press any key to continue...
4/30/2018 3:28:35 PM :: chwarr@CHWARR-ZEN4 :: C:\src
  [7] # ubuntu
Installing, this may take a few minutes...
Installation Failed!
Error: 0x80070005
Press any key to continue...
4/30/2018 3:28:39 PM :: chwarr@CHWARR-ZEN4 :: C:\src
  [8] # kali
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80070005
Error: 0x80070005 Access is denied.

Press any key to continue...

@benhillis
Copy link
Member

Logs would be useful, here are the instructions:

https://github.com/Microsoft/WSL/blob/master/CONTRIBUTING.md#8-detailed-logs

@chwarr
Copy link
Member

chwarr commented Apr 30, 2018

I e-mailed the logs to InsiderSupport@microsoft.com.

The e-mail contains:

  1. a console session trace of the commands I ran,
  2. the detailed .etl log files,
  3. the string "4cb5ee761adf45b5a0cbd31cda4bd4b8" so that it can be correlated to this comment in this issue.

@benhillis
Copy link
Member

@chwarr - Thanks for providing the logs. I took a look and it looks like something is blocking access to the lxcore driver. I will follow up with you via email to see if we can diagnose this further.

@GuyGoldenberg
Copy link

Turning off device guard, credentials guard and HyperV fixed this issue for me

@benhillis
Copy link
Member

@GuyGoldenberg - is it possible for you to narrow down which of those three components was causing the issue so I can follow up with them?

@TheGoddessInari
Copy link

I've been consistently seeing this issue, and what I found on my system upgraded to RS4 was that turning off Driver Signature Enforcement via the advanced boot menu made everything work fine (no more permission denied), knowing that, is there anything of a remedy or workaround, at least for this case?

I've had the error consistently without hypervisor/device guard/etc enabled at all. I'd really rather not be forced into a reinstall.

@benhillis
Copy link
Member

@chwarr dropped by my office today and I was able to identify the issue and will be working on a fix to backport to 1803.

@pentatonicfunk
Copy link

@TheGoddessInari any other workaround ? turning off Driver Signature Enforcement didnt help me

@benhillis
Copy link
Member

benhillis commented May 16, 2018

This is fixed in 17672. We are currently working with the servicing team to get this backported to 1803, bear with us!

@benhillis
Copy link
Member

benhillis commented May 16, 2018

The issue is with configurations that have user mode code integrity (UMCI) is enabled via a WDAC policy.

@richlilly2004
Copy link
Author

So I didn't have UMCI enabled, are we sure it's not VBS? Believe when i saw this (before I rebuilt w/ 1803) that I only had WDAG and Cred Guard enabled. No WDAC, but possibly could have been in audit mode.

@BeErikk
Copy link

BeErikk commented Jun 22, 2018

Windows 10.0.17134.81 (1803)
To clarify, I do not use insider builds and the Store installation method works for me. The server installation method does not work unless you run as an administrator. However, it is probably a non-supported option to use the server installation on Windows 10, but not so uncommon I think.

@Biswa96
Copy link

Biswa96 commented Jun 22, 2018

@BeErikk Try this solution #3304 (comment)

@agowa
Copy link

agowa commented Jan 27, 2019

@therealkenc Can you reopen this issue? I'm hitting it within Fast Ring.
Winver: 1903 (118323.1000)
I've Hyper-v and Docker installed on that box, too.
The error is thrown when I try to call _registerDistribution.
https://github.com/agowa338/WSL-DistroLauncher-Alpine/blob/master/DistroLauncher/WslApiLoader.cpp#L46
It was working in former Windows versions...

@agowa
Copy link

agowa commented Jan 27, 2019

Can confirm the issue with Hyper-V.
After upgrading to the latest windows version one needs to reinstall the Hyper-V feature or WSL is broken.

  1. Uninstall Hyper-V feature
  2. Reboot
  3. Install Hyper-V feature
  4. Reboot
  5. WSL will work again.

@pkeir
Copy link

pkeir commented Feb 19, 2019

I still have this problem, and alas now routinely use Cygwin again. I installed via the store, and running "powershell get-cipolicyinfo" gives me

Options HVCIOptions Version PolicyGuid
------- ----------- ------- ----------
      0           0       0 {0, 0, 0, 0...}

...which looks like I don't have UMCI on.

Perhaps a fresh install might work, but some advice on whether I can retrieve my files from the failed disk image would be useful. This would give some assurance in case this were to happen again in future.

@zoechi
Copy link

zoechi commented Apr 27, 2019

I still have this with Debian from Store.

Windows 10 Pro
10.0.17763

C:\Windows\System32\CodeIntegrity\SIPolicy.p7b does not exist

PS C:\windows\system32> get-cipolicyinfo
get-cipolicyinfo : Device Guard ist in dieser Edition von Windows nicht verfügbar.
In Zeile:1 Zeichen:1
+ get-cipolicyinfo
+ ~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-CIPolicyInfo], NotSupportedException
    + FullyQualifiedErrorId : System.NotSupportedException,Microsoft.SecureBoot.UserConfig.GetCIPolicyInfoCommand

Reinstalling Hyper-V didn't help.

@tomshaffner
Copy link

A side note for others who encounter this problem; one of the above comments triggered me to the fact that I was trying to install this in a system folder. When I moved it to a user folder it worked fine. For anyone who's trying this that might be an easier solution to test than some of the above.

@DDvO
Copy link

DDvO commented May 28, 2019

I just figured out that the following solved the problem for me:

Invoke the bash command from a Windows shell with admin rights.

Since then I can use WSL / bash again also with normal user rights.

@nataelj
Copy link

nataelj commented Aug 27, 2019

Bizarrely I had this problem again on a different computer with a more recent Windows build and my own solution above didn't work. The new solution was to give my user account full read/write rights to the folder and then, bizarrely, to run bash in a non-administrative window. Apparently my admin rights weren't sufficient for this but once I'd used that admin account to give my non-admin account rights it could then run fine.

@zipswich
Copy link

zipswich commented Sep 15, 2019

I had the same problem with Ubuntu1804.
Per the tip of @tomshaffner, I copied directory

C:\Program Files\WindowsApps\CanonicalGroupLimited.Ubuntu18.04onWindows_1804.2018.817.0_x64__79rhkp1fndgsc

into

C:\Applications

and run ubuntu1804.exe from

C:\Applications\CanonicalGroupLimited.Ubuntu18.04onWindows_1804.2018.817.0_x64__79rhkp1fndgsc

The problem is gone. It has been working fine with all kinds of commands.

@mrboli
Copy link

mrboli commented Sep 16, 2019

I'm getting this with a fresh install of 1903 and 1803 with ubuntu 18.04.

I don't have the command get-cipolicyinfo and I don't have any security profiles set.

@benstaniford
Copy link

I just started getting this today after installing some updates to my Windows 10 1803 (Build 17134) machine. Initially ubuntu just stopped working and reported 80070040 and then when I tried to reinstall by re-running Ubuntu under an elevated command prompt. I got 8007005. I seem to be stuck now.

@agowa
Copy link

agowa commented Nov 23, 2019

@benstaniford Can you please try this: #3020 (comment)

@benstaniford
Copy link

benstaniford commented Nov 26, 2019

@agowa338 Hmm, that doesn't seem to have worked. I didn't have Hyper-V enabled at all previously so I guess that's become a pre-req quite recently? However, enabling it, rebooting, and re-running the ubuntu18-4.exe process still shows an access denied HRESULT.

Oddly I can simply run bash.exe from a standard command prompt to gain access to WSL but the console that comes with Ubuntu no longer works. Running wsl or wslbridge also no longer work and VS Code can no longer show the WSL terminal.

I tried figuring out the cause of the access denied with procmon. This shows that when I run wsl as a normal user, an svchost gets an access denied on c:\Program Files\Ubuntu\rootfs. I've also just realized that running wsl as an administrator does work. I may have screwed this up when I was trying to recover from the initial Windows update issues when I deleted my WSL installation and tried to get it working again.

Update:

I was able to fix my issues by having my limited user take ownership of my C:\Program Files\Ubuntu folder. I guess my WSL rootfs shouldn't really be there, but I couldn't use the store to install Ubuntu because I have a corporate policy on my machine so it looks as though I've ended up screwing my permissions.

@lagosj
Copy link

lagosj commented Mar 26, 2020

I had the same problem with Ubuntu1804.
Per the tip of @tomshaffner, I copied directory

C:\Program Files\WindowsApps\CanonicalGroupLimited.Ubuntu18.04onWindows_1804.2018.817.0_x64__79rhkp1fndgsc

into

C:\Applications

and run ubuntu1804.exe from

C:\Applications\CanonicalGroupLimited.Ubuntu18.04onWindows_1804.2018.817.0_x64__79rhkp1fndgsc

The problem is gone. It has been working fine with all kinds of commands.

This right here worked all miracles. THIS GOES TO ALL OF YOU WITH LATEST WINDOWS 10.

@stdedos
Copy link

stdedos commented Jul 19, 2020

Definitely not fixedin1809.
As per the comment above (#3020 (comment) aka #3020 (comment)), just don't have spaces in your path.

@airtonix
Copy link

airtonix commented Oct 8, 2020

:( this is back again after Windows Insider build 20231.re_prelease.201002-1444

Can't install Alpine Linux.:

~ $ alpine
Temporary directory: C:\Users\zenobius\AppData\Local\Temp\wsl_Alpine_setup
Downloading   : http://dl-cdn.alpinelinux.org/alpine/v3.9/releases/x86_64/alpine-minirootfs-3.9.0-x86_64.tar.gz
To local file : install.tar.gz
The current working directory is: C:\Users\zenobius\AppData\Local\Temp\wsl_Alpine_setup
File successfully deleted
Mime type available
Begin download
Cache filename available
100% [====================]
End download
Downloaded OK
Hash of file install.tar.gz is: f82efed1a80c9af86c38bed10f3541c5588453b97684d767a5a3b0f3fa0e3f09

Verifying Hash: OK
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80070005
WslRegisterDistribution failed
Error: 0x80070005 Access is denied.

Press any key to continue...

Info

~ $ wsl -l -v
  NAME                   STATE           VERSION
* docker-desktop-data    Running         2
  docker-desktop         Running         2
Device name	pennyroyal
Processor	Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz   2.80 GHz
Graphics cards	Intel(R) HD Graphics 630 
NVIDIA GeForce GTX 1050 
Intel(R) HD Graphics 630
Installed RAM	32.0 GB (31.9 GB usable)
Device ID	94BE758E-135E-44FB-BEE1-E22CD026D42E
Product ID	00330-80000-00000-AA080
System type	64-bit operating system, x64-based processor
Pen and touch	No pen or touch input is available for this display
~ $ npx envinfo
npx: installed 1 in 1.852s

  System:
    OS: Windows 10 10.0.20231
    CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
    Memory: 20.79 GB / 31.86 GB
  Binaries:
    Node: 8.9.0 - C:\Program Files (x86)\Nodist\bin\node.EXE
    Yarn: 1.3.2 - C:\Program Files (x86)\Nodist\bin\yarn.CMD
    npm: 6.0.1 - C:\Program Files (x86)\Nodist\bin\npm.EXE
  Managers:
    pip2: 19.0.3 - C:\Python27\Scripts\pip2.EXE
    pip3: 20.2 - C:\Python38\Scripts\pip3.EXE
  Utilities:
    Git: 2.27.0.
  Virtualization:
    Docker: 19.03.13 - C:\ProgramData\DockerDesktop\version-bin\docker.EXE
  SDKs:
    Windows SDK:
      AllowDevelopmentWithoutDevLicense: Disabled
  IDEs:
    VSCode: 1.49.3 - C:\Program Files\Microsoft VS Code\bin\code.CMD
  Languages:
    Python: 3.8.1
  Browsers:
    Chrome: 86.0.4240.75
    Edge: Spartan (44.20231.1000.0), Chromium (Login Succeeded), ChromiumDev (Login Succeeded)
    Internet Explorer: 11.0.20231.1000

submitted feedback, but the feedback app decided to not give me a link...

T_T

@rodragon737
Copy link

Windows Insider broke permisions and no have rollback. [ @InsiderSupport@microsoft.com]

I_nstalling, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80070005
Error: 0x80070005 Acceso denegado.

Press any key to continue..._

@TomasKopecky
Copy link

I had the same problem with Ubuntu1804.

Per the tip of @tomshaffner, I copied directory

C:\Program Files\WindowsApps\CanonicalGroupLimited.Ubuntu18.04onWindows_1804.2018.817.0_x64__79rhkp1fndgsc

into

C:\Applications

and run ubuntu1804.exe from

C:\Applications\CanonicalGroupLimited.Ubuntu18.04onWindows_1804.2018.817.0_x64__79rhkp1fndgsc

The problem is gone. It has been working fine with all kinds of commands.

This solved my problem as well. Thanks a lot.

@PaulA-V
Copy link

PaulA-V commented Nov 1, 2023

A side note for others who encounter this problem; one of the above comments triggered me to the fact that I was trying to install this in a system folder. When I moved it to a user folder it worked fine. For anyone who's trying this that might be an easier solution to test than some of the above.

This worked for me but make sure you copy it to a folder on the system drive per the following MS documentation.

https://learn.microsoft.com/en-us/windows/wsl/troubleshooting#installation-issues

Regards,

Paul

@agowa
Copy link

agowa commented Nov 16, 2023

People in here #6744 reported that this issue only exists with the store version and vanishes when WSL is installed without the Store and wsl.exe --update is ran.

The windows store probably causes this permission issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests