Fixes / Windows · Checked

Windows Error 0x80070005 (Access is denied): causes and fixes

Short answer

Error 0x80070005 (E_ACCESSDENIED) means a Windows process was blocked from a file, folder or registry key it needed. It shows up most often in Windows Update, the Microsoft Store and Office activation. Sign in with an administrator account, restart, and try again. If Windows Update still fails, reset its components (rename SoftwareDistribution and catroot2) from an administrator Command Prompt.

What this message means

0x80070005 is the Windows code E_ACCESSDENIED. The "8007" part means it came from a standard Windows error, and "0005" is ERROR_ACCESS_DENIED. The account or service doing the work (you, SYSTEM or TrustedInstaller) was refused permission to read or change something. In Windows Update, Microsoft says this usually points to the component store (C:\Windows\WinSxS), the C:\Windows\SoftwareDistribution folder or the Component Based Servicing registry key. The same code shows up in the Microsoft Store, Office activation, System Restore and app installers. Your files are not damaged. The fix is to restore the right permissions or remove whatever is locking the files.

Common causes

CauseHow to tell
You are not signed in as an administrator, or the app is not running elevatedSettings > Accounts > Your info shows "Standard user" under your name, or the same action works when you right-click the program and choose Run as administrator.
Corrupted Windows Update cache or components (SoftwareDistribution, catroot2)Windows Update shows 0x80070005 on the same update after every retry, while Store apps and other programs install normally.
Antivirus or another security tool is locking update or install filesThe error began after you installed or updated a third-party antivirus or VPN, or it goes away when real-time protection is paused. Running fltmc in an admin Command Prompt lists non-Microsoft filter drivers.
Wrong permissions on system folders or registry keys (WinSxS, SoftwareDistribution, Component Based Servicing)C:\Windows\Logs\CBS\CBS.log contains lines like "Failed to create file. [HRESULT = 0x80070005 - E_ACCESSDENIED]", often after a cleanup tool, a permissions change or a management agent touched system folders.
Broken Microsoft Store cache or Store install serviceThe error appears only when you download or update apps in the Microsoft Store (or the Xbox app), and Windows Update works.
Registry permissions changed by a Windows update (Office activation)Word or Excel shows 0x80070005 when you activate Office, and the problem started right after a Windows update.

How to fix it

1. Use an administrator account and restart

  1. Open Settings > Accounts > Your info and check that it says "Administrator" under your name. If it says "Standard user", sign in with an admin account or ask whoever manages the PC.
  2. Restart the PC. Choose Restart, not Shut down, so any locked files are released.
  3. Try again. For an installer or Office app, right-click it and choose Run as administrator, then select Yes.

2. Reset Windows Update components

Windows Update errors, Windows 10 and Windows 11

  1. Type cmd in the Search box, right-click Command Prompt and choose Run as administrator.
  2. Stop the update services by running these one at a time: net stop wuauserv, then net stop bits, then net stop cryptSvc
  3. Rename the cache folders: ren %windir%\SoftwareDistribution SoftwareDistribution.old and ren %windir%\System32\catroot2 catroot2.old
  4. Start the services again: net start cryptSvc, then net start bits, then net start wuauserv
  5. Restart the PC and run Windows Update again.

3. Repair or reset the Microsoft Store

Microsoft Store and Xbox app installs. Windows 11: Settings > Apps > Installed apps. Windows 10: Settings > Apps > Apps & features.

  1. Press Windows + R, type wsreset.exe and press Enter. A blank window opens, then the Store reopens once its cache is cleared.
  2. If the error comes back, open Settings > Apps > Installed apps, find Microsoft Store, select the three dots (...) and choose Advanced options. On Windows 10, select Microsoft Store in Apps & features, then Advanced options.
  3. Select Repair and test the install again. If it still fails, select Reset. This clears the Store's local data.
  4. Press Windows + R, type services.msc and open Microsoft Store Install Service. If its startup type is Disabled, set it to Manual or Automatic, then select Start (or Restart if it is already running).

4. Pause third-party antivirus and check filter drivers

  1. Temporarily turn off real-time protection in your third-party antivirus, and disconnect any VPN.
  2. In an administrator Command Prompt, run fltmc to list file system filter drivers.
  3. For each non-Microsoft driver in the list, run fltmc unload <DriverName> (use the name exactly as fltmc shows it).
  4. Retry the update or install, then turn your antivirus back on. If the antivirus turns out to be the cause, update it or ask its vendor for a fix.

5. Reset permissions on the component store and repair system files

Persistent Windows Update or servicing errors. Back up your system drive first.

  1. Open Command Prompt as administrator.
  2. Reset the default permissions: icacls "%windir%\WinSxS" /reset /t /c /q and then icacls "%windir%\SoftwareDistribution" /reset /t /c /q
  3. Make TrustedInstaller the owner of WinSxS again: icacls "%windir%\WinSxS" /setowner "NT SERVICE\TrustedInstaller" /t /c /q
  4. Repair the component store: DISM /Online /Cleanup-Image /RestoreHealth (this can take several minutes).
  5. Run sfc /scannow and keep the window open until it reaches 100%.
  6. Restart the PC and try the update again.

6. Fix registry permissions for Office activation

Microsoft 365 / Office on Windows, when the error started after a Windows update

  1. Close all Office apps. Right-click Start, choose Run, type regedit, select OK, then Yes.
  2. Expand HKEY_USERS, right-click S-1-5-20 and choose Permissions.
  3. Select Add, type your user name, select Check Names, then OK.
  4. Select Advanced, edit your user account and tick Full Control. Do the same for NETWORK SERVICE.
  5. Tick "Replace all child object permission entries with inheritable permission entries from this object", select OK, close Registry Editor and open Word or Excel to activate.
  6. If it still fails, open Word, go to File > Account > Update Options > Update Now, then try activating again.

Next time, skip the search

Crade is an AI assistant for Mac and Windows that sees your screen. When a message like this pops up, ask “what does this mean?” and it explains the exact error in front of you, step by step.

Download Crade

Still not fixed?

Save the log so you can see exactly what was denied. For Windows Update, run Get-WindowsUpdateLog in PowerShell, which writes WindowsUpdate.log to your desktop, and search it for 0x80070005. Also check C:\Windows\Logs\CBS\CBS.log. The file or folder named on the E_ACCESSDENIED line tells you what to fix. On a work or school PC, contact your IT department first, because Group Policy or a management agent may be deliberately blocking the change. On a personal PC, an in-place repair install from Microsoft's Windows download page keeps your files and apps and rebuilds system permissions. If that fails too, contact Microsoft Support through the Get Help app.

Questions people ask

Is error 0x80070005 a virus?

Almost never. It is a normal Windows permissions error. Security software is a more common cause than malware, because it can lock files that Windows Update or an installer needs.

Why do I get 0x80070005 even though I'm an administrator?

Some system folders belong to TrustedInstaller or SYSTEM, not to you, so being an administrator is not always enough. If those accounts have lost their permissions, or antivirus has locked the files, you still get Access is denied until the permissions are reset or the lock is removed.

Does 0x80070005 mean the same thing in Windows Update, the Microsoft Store and Office?

Yes, the code means E_ACCESSDENIED everywhere. What gets blocked depends on the app: the update cache and component store for Windows Update, the Store cache or install service for the Store, and a registry key for Office activation.

Can I just skip the update that fails with 0x80070005?

You can pause updates for a while in Settings > Windows Update, but the problem won't fix itself. Later updates, including security updates, will usually fail the same way until you fix the permissions.

How do I fix 0x80070005 when creating a System Restore point?

Temporarily turn off third-party antivirus, restart, and try again as an administrator. If it still fails, run DISM /Online /Cleanup-Image /RestoreHealth and then sfc /scannow from an administrator Command Prompt.

Sources