Skip to content

0x80070005 : Access is denied. #4704

Closed
Closed

Description

@venkee70

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

Activity

  1. github-actions commented on Aug 5, 2024

    @github-actions

    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.

  2. sajiby3k commented on Aug 5, 2024

    @sajiby3k

    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.

  3. venkee70 commented on Aug 5, 2024

    @venkee70
    Author

    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. :-)

  4. adamsmith34 commented on Aug 30, 2024

    @adamsmith34

    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.

  5. marioqxx commented on Sep 10, 2024

    @marioqxx

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

  6. KKire commented on Oct 3, 2024

    @KKire

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

  7. DrStrange commented on Oct 14, 2024

    @DrStrange
  8. adamsmith34 commented on Oct 14, 2024

    @adamsmith34

    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.

  9. ROBYER1 commented on Oct 28, 2024

    @ROBYER1

    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?

  10. llvs commented on Jan 31, 2025

    @llvs

    Give a thumbs up to this probable root issue here to get this solved more quickly:
    WinGet Database getting corrupted on multi-user systems when using GSudo-like elevation methods

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions