sodcalculator

10 Tech How-To

Fix 0x80070005 Access Denied on Windows

Guide 10-53192 · Updated · Step by step

This error appears when Windows or an application cannot access a file, folder, or registry key due to permission issues. The fix typically involves taking ownership, adjusting permissions, or disabling conflicting security software. Below are the most effective methods to resolve it.

What You’ll Need

  • An administrator account (or the ability to enter an administrator password)
  • Access to the affected file, folder, or registry key
  • Patience – some steps require a restart

Step-by-Step

Method 1: Run the Program as Administrator

  1. Right-click the program or installer that shows the error.
  2. Select Run as administrator.
  3. If prompted by User Account Control, click Yes.
  4. Try the operation again. If it works, the issue is that the program needs elevated privileges.

Method 2: Take Ownership of the File or Folder

  1. Right-click the file or folder and select Properties.
  2. Go to the Security tab and click Advanced.
  3. At the top, next to Owner, click Change.
  4. Type your username (or Administrators) in the box, click Check Names, then OK.
  5. Check the box Replace owner on subcontainers and objects.
  6. Click OK and then OK again to close Properties.
  7. Reopen Properties → Security → Edit.
  8. Select your user, check Full control, and click OK.

Method 3: Use the Command Line to Take Ownership

  1. Open Command Prompt as administrator (press Win, type cmd, right-click, and choose Run as administrator).
  2. Type the following and press Enter (replace C:\path\to\file with your actual path):
  3. takeown /f "C:\path\to\file" /r /d y
  4. Then grant yourself full control:
  5. icacls "C:\path\to\file" /grant %USERNAME%:F /t
  6. Close Command Prompt and try the operation again.

Method 4: Disable or Configure Antivirus / Security Software

  1. Temporarily disable your third-party antivirus or security suite (not Windows Defender, unless you are sure).
  2. Try the operation again. If it works, add an exception for the file or folder in your security software.
  3. Re-enable the antivirus immediately after testing.

Method 5: Check and Repair File Permissions via Settings

  1. Open Settings → Privacy & security → Security (or Windows Security).
  2. Click Virus & threat protection → Manage settings.
  3. Scroll to Controlled folder access and check if it is on. If so, either turn it off temporarily or add the affected app to the allowed list.

Method 6: Reset Permissions Using PowerShell

  1. Open PowerShell as administrator.
  2. Run: icacls "C:\full\path" /reset /t /c
  3. This resets permissions to inherited defaults. You may need to reapply your own permissions afterward.

Method 7: Check Disk for Errors

  1. Open Command Prompt as administrator.
  2. Run: chkdsk C: /f (replace C: with the drive letter if needed).
  3. If prompted, type Y and restart the computer to let it run.

Common Mistakes

  • Forgetting to run Command Prompt or PowerShell as administrator – the commands will fail otherwise.
  • Taking ownership only of the top folder but not applying it to subfolders (forgetting the /t or the checkbox).
  • Disabling antivirus and forgetting to re-enable it, leaving your system unprotected.
  • Changing permissions on system files (like C:\Windows) which can break Windows – only work on the specific file/folder you need.
  • Using the wrong path, especially with spaces – always enclose paths in quotes.

Tips

  • Always create a system restore point before making major permission changes.
  • If the error occurs during a Windows Update, restart the Windows Update service: net stop wuauserv then net start wuauserv (run as admin).
  • For registry keys, use Regedit and follow the same ownership steps (right-click → Permissions → Advanced).
  • If the error appears when opening a specific app, reinstall that app – sometimes the installation is corrupted.
  • Use the Effective Access tab in Advanced Security settings to see exactly what permissions a user has.

Troubleshooting

If the error persists after trying these methods:

  • Check if the file is read-only. Right-click → Properties → uncheck Read-only.
  • Run System File Checker: Open Command Prompt as admin and run sfc /scannow. This repairs corrupted system files.
  • Use DISM: Run DISM /Online /Cleanup-Image /RestoreHealth as admin to fix Windows image issues.
  • Create a new user account: Sometimes the profile is corrupted. Create a new admin account and try the operation there.
  • Check if the drive is encrypted or locked: If using BitLocker, ensure the drive is unlocked.
  • Boot into Safe Mode: Restart with Shift + Restart, then choose Troubleshoot → Advanced → Startup Settings → Restart → 4. In Safe Mode, try the operation – if it works, a background service is interfering.
  • Last resort – repair install Windows: Use the Media Creation Tool to perform an in-place upgrade, keeping your files and apps. This often fixes deep permission corruption.

Frequently Asked Questions

Why does 0x80070005 happen even when I am the administrator?

Being an administrator does not automatically grant full control over every file. Some system files and folders are owned by TrustedInstaller or SYSTEM, and you must explicitly take ownership first.

Can I fix this error without using Command Prompt?

Yes, you can use the graphical Properties → Security → Advanced method to change ownership and permissions. The command line is faster, but not strictly required.

Is it safe to take ownership of system files?

Generally no – only do this for the specific file or folder causing the error. Changing ownership of the entire C:\Windows folder can make Windows unstable. If you must, only modify the exact path mentioned in the error.

Will this error damage my computer?

No, the error itself is harmless – it just prevents an operation. However, incorrectly changing permissions can cause problems, so follow the steps carefully.

Does this error occur on Windows 10 and 11?

Yes, 0x80070005 is common on both Windows 10 and Windows 11, and the fixes are essentially the same.

What if the error is from a Windows Update?

Try running the Windows Update Troubleshooter (Settings → System → Troubleshoot → Other troubleshooters). If that fails, reset the Windows Update components manually via Command Prompt (stop services, rename SoftwareDistribution and catroot2 folders, then restart services).

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →