How to Fix Error 0x80070005 (Access Denied) in Windows 11

Windows 11TroubleshootingFixUpdatesSystem

The Problem

0x80070005 is Windows' generic ACCESS_DENIED result, dressed up as an error code. Something — the update service, the Store, the activation client, an installer — asked the operating system for access and was refused.

The confusing part is that the refusal usually has nothing to do with your account being an administrator. It is normally one of four things: a service running under a system account that has lost permission to a folder or registry key, security software blocking the operation, damaged Windows Update working folders, or a corrupted local profile.

Getting "You need permission to perform this action" on your own files instead? That is the file-ownership version of the same refusal — see fix access denied and "you need permission".

Symptoms

  • Windows Update fails with 0x80070005 and retries endlessly.
  • Microsoft Store downloads stop with the same code.
  • Windows activation fails with 0x80070005.
  • An installer or .msi quits partway with "access is denied".
  • A scheduled task or script fails with the code even though it runs fine manually.

Step 1: Confirm You Are Actually an Administrator

  1. Open SettingsAccountsYour info and look for Administrator under your name.
  2. If it says Standard user, either sign in with an admin account or have one change your type in SettingsAccountsOther users.
  3. Retry the failing action from an elevated window: right-click StartTerminal (Admin), or right-click an installer → Run as administrator.
  4. On a work or school PC, policy may be blocking this deliberately — check with your IT team before changing anything.

Step 2: Turn Off Third-Party Security Software Temporarily

Security suites intercept file and registry writes, and a blocked write comes back as access denied.

  1. Fully exit the suite from the system tray, or disable its real-time and "ransomware protection" modules.
  2. Retry the failing action.
  3. If it now succeeds, add an exclusion for the relevant folder, or uninstall the suite and run the vendor's official removal tool — disabling alone often leaves filter drivers active.
  4. Microsoft Defender takes over automatically: fix Windows Defender not working.
  5. Also check controlled folder access: Windows SecurityVirus & threat protectionManage ransomware protection → turn Controlled folder access off while testing.

Step 3: Reset the Windows Update Components

For update and Store failures, the working folders are usually the problem. Renaming them forces Windows to build clean ones.

  1. Right-click StartTerminal (Admin).
  2. Stop the services:
    net stop wuauserv
    net stop cryptSvc
    net stop bits
    net stop msiserver
    
  3. Rename the two cache folders:
    ren C:\Windows\SoftwareDistribution SoftwareDistribution.old
    ren C:\Windows\System32\catroot2 catroot2.old
    
  4. Start everything again:
    net start wuauserv
    net start cryptSvc
    net start bits
    net start msiserver
    
  5. Reboot and retry the update. More on update failures: fix Windows 11 update errors and fix Windows Update stuck.

Step 4: Reset the Microsoft Store Cache

  1. Press Windows + R, type wsreset.exe, and press Enter. A blank window opens for about 30 seconds and then the Store launches — that is the whole procedure.
  2. If the Store itself is broken, go to SettingsAppsInstalled appsMicrosoft StoreAdvanced optionsRepair, then Reset.
  3. Full walkthrough: fix Microsoft Store not working.

Step 5: Repair the System Files and Component Store

  1. In Terminal (Admin):
    sfc /scannow
    
  2. Then:
    DISM /Online /Cleanup-Image /RestoreHealth
    
  3. Reboot and run sfc /scannow again.
  4. Detail: how to run SFC and DISM.
  5. If DISM itself fails with 0x800f081f, it cannot find replacement files — see fix DISM error 0x800f081f.

Step 6: Restore Permissions on the System Drive

Only do this if the earlier steps have not worked. It rewrites inherited permissions across the drive and takes a long time on a large disk.

  1. In Terminal (Admin), reset registry and file permissions to their defaults:
    secedit /configure /cfg %windir%\inf\defltbase.inf /db defltbase.sdb /verbose
    
  2. Reboot when it finishes.
  3. This restores the standard permission set that Windows shipped with, which is exactly what a broken third-party installer or an aggressive "optimiser" tends to have damaged.
  4. Do not skip the reboot — services will not pick up the new permissions until they restart.

Step 7: Test With a New Local Administrator Account

A damaged profile produces access-denied errors that follow you between apps but disappear for any other user.

  1. SettingsAccountsOther usersAdd account.
  2. Choose I don't have this person's sign-in informationAdd a user without a Microsoft account.
  3. Create the account, then set it to Administrator under Change account type.
  4. Sign in as that user and retry the failing action.
  5. If it works there, the original profile is damaged — move your files across rather than trying to repair it. See fix "signed in with a temporary profile" and fix User Profile Service failed the sign-in.

Step 8: Deal With Activation Specifically

If the code appears only during activation:

  1. Open Terminal (Admin) and run:
    slmgr /ato
    
  2. If that fails, re-enter the key:
    slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
    
  3. Check the date, time, and time zone are correct in SettingsTime & language — a wrong clock breaks the secure connection to Microsoft's activation servers and returns access denied.
  4. Confirm the PC can reach the internet without a proxy or VPN interfering, then retry.
  5. Full guide: activate Windows 11 and fix activation errors.

What Not to Do

  • Don't grant "Everyone: Full Control" on system folders to make an error go away. It removes protections that stop malware from modifying Windows, and it does not fix the underlying cause.
  • Don't disable User Account Control. It does not resolve 0x80070005 and it weakens the machine.
  • Don't run registry permission "fixers" from download sites. The secedit command in Step 6 is the supported equivalent.
  • Don't leave security software uninstalled after testing — either reinstall it or stay on Defender.

Still Not Working?

If a brand new administrator account also hits the error, and SFC, DISM, and the permission reset have all run clean, an in-place repair install replaces every Windows component while keeping your files and apps: reinstall Windows without losing data. Back up first — set up automatic backups.

Related: fix error 0x80004005, fix "can't delete file in use", and fix Windows Firewall blocking apps.