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

Receive "Access is Denied" error message when attempting to run WSL #10475

Closed
1 of 2 tasks
TerraX3000 opened this issue Sep 14, 2023 · 2 comments
Closed
1 of 2 tasks

Receive "Access is Denied" error message when attempting to run WSL #10475

TerraX3000 opened this issue Sep 14, 2023 · 2 comments

Comments

@TerraX3000
Copy link

Windows Version

Microsoft Windows [Version 10.0.22621.2134]

WSL Version

0.0.0.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.90

Distro Version

Ubuntu 20.04

Other Software

Visual Studio Code 1.82.2 with WSL Extension v0.81.3

Repro Steps

Open command prompt
wsl --status

-or-
Open Windows PowerShell
wsl --status

-or-
Open VS Code and Connect to WSL

Expected Behavior

See general information about your WSL configuration, such as default distribution type, default distribution, and kernel version.
(per https://learn.microsoft.com/en-us/windows/wsl/basic-commands)

Actual Behavior

Command Prompt error message:

Access is denied.

Windows PowerShell error message:

Program 'wsl.exe' failed to run: Access is deniedAt line:1 char:1
+ wsl --status
+ ~~~~~~~~~~~~.
At line:1 char:1
+ wsl --status
+ ~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedException
+ FullyQualifiedErrorId : NativeCommandFailed

VSCode error message:

Failed to connect to the remote extension host server (Error: spawn EPERM)

Diagnostic Logs

WslLogs-2023-09-14_15-56-48.zip

@TerraX3000
Copy link
Author

Additional Information:

I found two ways I can run WSL in the console.
However, neither of these two methods resolve the issues of running WSL in the command prompt, PowerShell, or VS Code environments.

  • From Windows Explorer:
  1. Go to C:\Windows\System32
  2. Right click on wsl.exe
  3. Click 'Run as administrator'

Result: a WSL terminal session opens in a new window

  • From the Windows Store
  1. Search for WSL in the Windows Store
  2. Install WSL from the Windows Store
  3. Choose "Open" WSL in the Windows Store

Result: a WSL terminal session opens in a new window

Copy link
Contributor

This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.

Thank you!

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

1 participant