errors.x7.al › Windows

0x80070005 — Access is denied

Error 0x80070005, shown by Windows as “Access is denied”, means that a program, installer, or Windows component tried to do something it was not permitted to do. In Windows, this code is the system's generic “permission denied” result: the request reached Windows, but the account or process running it did not have the rights to finish the job. It commonly appears with Windows Update, when installing software, when copying or deleting files, and during activation.

Advertisement

What it means

Windows protects files, folders, services and registry keys with access control lists (ACLs). Each entry grants or denies a specific right to a user or group. When a process asks for a right it does not hold, Windows refuses the operation and returns 0x80070005. The number is the Win32 error ERROR_ACCESS_DENIED (5) expressed in HRESULT form, which is why it often ends in 80070005 rather than a plain code.

Because the cause is a missing permission rather than a fault, the same code appears in many different places. The fix therefore depends on where it happened and which account was running. That is why the correct first question is always: what was I doing when it appeared?

Where you meet it also narrows the cause. If the message names a file or folder, the problem is almost certainly the access control list on that path, or an account that does not own it. If it names Windows Update or a system component, the account running that service usually lacks rights over its own working folders, or the folders' permissions have been damaged. If it appears while installing an app, the installer is simply not running elevated. Reading the error together with its context turns a vague “access denied” into a specific missing right you can grant.

Common causes

  • The action needs administrator rights, but the app or process was started as a standard user.
  • A folder or file has a restrictive ACL, or its ownership was changed to another account.
  • Windows Update's own service folders (SoftwareDistribution) or registry keys have broken permissions.
  • Third-party security or “cleanup” software is blocking the change or holding the file open.
  • Stored credentials or the account's profile is damaged, so the software cannot authenticate a required service.

How to fix it

  1. Run the tool as administrator. Right-click the installer or shortcut and choose Run as administrator. If your account is a standard user, sign in with an administrator account first.
  2. Fix permissions on the file or folder. Right-click it, open Properties, go to the Security tab, click Advanced, and take ownership before granting your account Full control.
    takeown /f "C:\path\to\folder" /r /d y
    icacls "C:\path\to\folder" /grant "%USERNAME%:F" /t
  3. Reset the Windows Update components if the error blocks updates. Open an elevated Command Prompt and run:
    net stop wuauserv
    net stop bits
    ren C:\Windows\SoftwareDistribution SoftwareDistribution.old
    net start wuauserv
    net start bits
  4. Rule out security software. Temporarily pause third-party antivirus or optimisation tools, then retry. Re-enable them afterwards.
  5. Repair system files. In an elevated prompt, run sfc /scannow, then DISM /Online /Cleanup-Image /RestoreHealth, and restart.
Advertisement

How to prevent it

Keep a separate administrator account and use it only when installing or changing system settings. Avoid editing permissions by hand unless you must, and never add a broad Deny rule to a system folder — deny rules override grants and are a frequent hidden cause. Let Windows Update finish before installing heavy software, and keep a current system backup so you can roll back if permissions become tangled.

It also helps to leave the default folders alone. Tools that “clean” or “optimise” Windows sometimes rewrite ownership of SoftwareDistribution, WinSxS or registry hives, which later produces this exact error. When you must change a permission, record what you changed so you can put it back. A short note now saves a long afternoon of hunting later.

Advertisement