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

0x80070005 : Access is denied. #4704

Closed
venkee70 opened this issue Aug 5, 2024 · 9 comments
Closed

0x80070005 : Access is denied. #4704

venkee70 opened this issue Aug 5, 2024 · 9 comments
Milestone

Comments

@venkee70
Copy link

venkee70 commented Aug 5, 2024

Brief description of your issue

Getting below error while running winget-cli from normal user ( non administrator account)
winget list
Failed in attempting to update the source: winget
Failed to open the predefined source; please report to winget maintainers.
An unexpected error occurred while executing the command:
0x80070005 : Access is denied.

Steps to reproduce

winget list
Failed in attempting to update the source: winget
Failed to open the predefined source; please report to winget maintainers.
An unexpected error occurred while executing the command:
0x80070005 : Access is denied.

Expected behavior

List all packages in the machine

Actual behavior

Returned error
C:\Users\Ramana>winget list
Failed in attempting to update the source: winget
Failed to open the predefined source; please report to winget maintainers.
An unexpected error occurred while executing the command:
0x80070005 : Access is denied.

Environment

C:\Users\Ramana>winget --info
Windows Package Manager v1.8.1911
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22631.3958
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.23.1911.0

Winget Directories
-----------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Diag…
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\sett…
Portable Links Directory (User)    %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User)       %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root              C:\Program Files\WinGet\Packages
Portable Package Root (x86)        C:\Program Files (x86)\WinGet\Packages
Installer Downloads                %USERPROFILE%\Downloads

Links
---------------------------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
License Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

Admin Setting                             State
--------------------------------------------------
LocalManifestFiles                        Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Disabled
ProxyCommandLineOptions                   Disabled
DefaultProxy                              Disabled
Copy link

github-actions bot commented Aug 5, 2024

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Aug 5, 2024
@sajiby3k
Copy link

sajiby3k commented Aug 5, 2024

I am seeing this is related to specific normal user. Let's say - you have two users - user1 and user2. For user1 it is not working. Kindly log into another user - user2. And try the same command. In my case for user2 - winget list works. I do not know what permission or files corrupted for user1 - that made winget get permission denied under normal user named - user1. Anyone can shed some light why user1 getting permission deny and how to fix that.

@venkee70
Copy link
Author

venkee70 commented Aug 5, 2024

Solved - based on the another thread.

Cause: the WinGet folder in the windows temp folder of my non-privileged user had - for whatever reason - admin access rights only.

Fix: deleted this WinGet folder, ran winget source update from an non-elevated shell again. Et voilà, a new WinGet folder with proper permissions has been created and everything is fine again. :-)

@venkee70 venkee70 closed this as completed Aug 5, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Triage Issue need to be triaged label Aug 5, 2024
@adamsmith34
Copy link

Fix: deleted this WinGet folder, ran winget source update from an non-elevated shell again. Et voilà, a new WinGet folder with proper permissions has been created and everything is fine again. :-)

Thank you for this solution. Specifically, I navigated into the C:\Users\<user>\AppData\Local\Temp folder, entered admin credentials, deleted the Temp folder, ran winget source update with no errors, and then winget behaved as expected.

@marioqxx
Copy link

Also thank you for the solution @venkee70.
As @adamsmith34 I deleted the folder C:\Users<User>\AppData\Local\Temp\Winget, which required Admin-rights.

@KKire
Copy link

KKire commented Oct 3, 2024

I don't even have that folder in the Temp and still have the same error

@denelon denelon added this to the 1.9 Client milestone Oct 10, 2024
@DrStrange
Copy link

DrStrange commented Oct 14, 2024

gsudo can cause error 0x80070005:

gerardog/gsudo#376

The UniGetUI package manager uses gsudo:
https://github.com/marticliment/UniGetUI

@adamsmith34
Copy link

gsudo can cause error 0x80070005:

gerardog/gsudo#376

The UniGetUI package manger uses gsudo: https://github.com/marticliment/UniGetUI

This is it exactly. Thank you.

@ROBYER1
Copy link

ROBYER1 commented Oct 28, 2024

Thanks for the solution, I am shocked that Windows doesn't just show the UAC prompt window to delete the admin access only folder in the appdata temp folder when it tries to install from the store?

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

8 participants