> ## Documentation Index
> Fetch the complete documentation index at: https://errorguide.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Fix Windows Error 0x80070005: E_ACCESSDENIED

> Fix Windows error 0x80070005 (E_ACCESSDENIED) in Windows Update, Microsoft Store, and app installs by fixing permissions, services, and system files.

Error **0x80070005**, also shown as **E\_ACCESSDENIED** or "Access is denied", means Windows or an app tried to read or change a file, folder, or registry key it does not have permission to use. It often appears during Windows Update, Microsoft Store downloads, System Restore, or software installs. Work through the fixes below in order and retry the failing action after each one.

## What causes error 0x80070005

* Your account, or the process doing the work, lacks administrator rights.
* Incorrect permissions on system folders such as `C:\Windows\SoftwareDistribution` or `C:\ProgramData`.
* Antivirus or security software blocking access to files.
* Corrupted Windows Update components or system files.
* Wrong system date and time, which can break secure connections to update servers.

<Tip>
  Restart your PC before you start. A pending restart or a locked file is a common cause of this error.
</Tip>

## Fix 1: Run the action as administrator

Make sure you are signed in with an administrator account. For installers and tools, right-click the file and select **Run as administrator**.

To check your account type, go to **Settings > Accounts > Your info**. It should say **Administrator** under your name.

## Fix 2: Check the date, time, and time zone

<Steps>
  <Step title="Open time settings">
    Go to **Settings > Time & language > Date & time**.
  </Step>

  <Step title="Turn on automatic time">
    Turn on **Set time automatically** and **Set time zone automatically**.
  </Step>

  <Step title="Sync now">
    Click **Sync now**, then retry the update or install.
  </Step>
</Steps>

## Fix 3: Temporarily disable third-party antivirus

Some antivirus products block Windows Update or installers from writing to protected folders. Turn off real-time protection in your antivirus, retry the action, then turn protection back on.

<Warning>
  Always re-enable your antivirus after testing. Do not browse the web or open unknown files while it is off.
</Warning>

## Fix 4: Run the Windows Update troubleshooter

* **Windows 11:** Go to **Settings > System > Troubleshoot > Other troubleshooters**, then click **Run** next to **Windows Update**.
* **Windows 10:** Go to **Settings > Update & Security > Troubleshoot > Additional troubleshooters**, select **Windows Update**, and click **Run the troubleshooter**.

## Fix 5: Reset Windows Update components

If the error appears during Windows Update, clear the update cache. Open **Command Prompt** as administrator and run:

```bash Command Prompt theme={null}
net stop wuauserv
net stop bits
net stop cryptsvc
ren C:\Windows\SoftwareDistribution SoftwareDistribution.old
ren C:\Windows\System32\catroot2 catroot2.old
net start cryptsvc
net start bits
net start wuauserv
```

Restart your PC and check for updates again.

## Fix 6: Take ownership and reset folder permissions

If the error names a specific folder, or happens when you open or change files, reset that folder's permissions.

<Steps>
  <Step title="Open folder properties">
    Right-click the folder, select **Properties**, and open the **Security** tab.
  </Step>

  <Step title="Change the owner">
    Click **Advanced**, then **Change** next to **Owner**. Enter your user name, click **Check Names**, and click **OK**. Select **Replace owner on subcontainers and objects**.
  </Step>

  <Step title="Grant full control">
    Back on the **Security** tab, click **Edit**, select your account, and check **Full control**. Click **Apply**.
  </Step>
</Steps>

To reset permissions on a folder to their defaults from an elevated Command Prompt, run:

```bash Command Prompt theme={null}
icacls "C:\path\to\folder" /reset /t /c /q
```

<Warning>
  Do not take ownership of the entire `C:\Windows` folder. Changing permissions on core system folders can break Windows. Only change the specific folder named in the error.
</Warning>

## Fix 7: Repair system files with SFC and DISM

Open **Command Prompt** as administrator and run these commands one at a time:

```bash Command Prompt theme={null}
DISM /Online /Cleanup-Image /RestoreHealth
sfc /scannow
```

Wait for each scan to finish, then restart your PC.

## Fix 8: Reset the Microsoft Store

If the error appears in Microsoft Store, press **Windows + R**, type `wsreset.exe`, and press **Enter**. The Store cache clears and the Store opens automatically when it is done.

## Frequently asked questions

<AccordionGroup>
  <Accordion title="What does E_ACCESSDENIED mean?">
    It is the Windows code for "Access is denied". The process that hit the error did not have permission to read or write a file, folder, or registry key.
  </Accordion>

  <Accordion title="Can error 0x80070005 appear in System Restore?">
    Yes. Disable your antivirus temporarily, or run System Restore from Safe Mode, where third-party software does not load.
  </Accordion>

  <Accordion title="I am on a work or school PC. What should I do?">
    Your organization may restrict permissions through policy. Contact your IT administrator instead of changing ownership or permissions yourself.
  </Accordion>
</AccordionGroup>

## Related errors

<Card title="Fix 0x80070422: The service cannot be started" icon="wrench" href="/index">
  Fix Windows Update errors caused by disabled services.
</Card>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.