Ad Space — Top Banner

0x80070005

OneDrive Software

Severity: Moderate

What Does This Error Mean?

OneDrive 0x80070005 is the Windows error E_ACCESSDENIED — the OneDrive process tried to read or write a file and the operating system refused.
It happens when the file is locked by another app, when NTFS permissions on the OneDrive folder are wrong, or when a security tool blocks the OneDrive process from your user folders.
Find the offending file, fix permissions, and OneDrive resumes.

Affected Models

  • OneDrive on Windows 10 and 11
  • OneDrive on Windows Server (with Files On-Demand)
  • Folders inherited from another user account

Common Causes

  • File is open in another program (Word, Excel, Photoshop)
  • NTFS permissions on the OneDrive folder are wrong — usually after a profile migration
  • Controlled Folder Access is blocking OneDrive.exe
  • Antivirus quarantined the file
  • OneNote section file held open by another OneNote instance

How to Fix It

  1. Find which file is failing.

    Click the OneDrive tray icon and read the error pane — it lists the specific file that failed with 0x80070005.
    If many files fail, the cause is permission or security software, not the file.
    If only one file fails, follow the next step.

  2. Close apps that may have the file open.

    If the file is a Word doc, close Word completely (check Task Manager for any winword.exe).
    If it's a PDF, close all PDF readers.
    OneDrive cannot upload while the file has an exclusive write lock from another process.

  3. Check Controlled Folder Access.

    Open Windows Security → Virus & threat protection → Manage ransomware protection → Controlled folder access.
    If it's on, scroll down to 'Allow an app through Controlled folder access'.
    Add OneDrive.exe (in %localappdata%\Microsoft\OneDrive\OneDrive.exe).
    Without this, ransomware protection blocks OneDrive from writing to your Documents and Pictures.

  4. Reset NTFS permissions on the OneDrive folder.

    This fixes profiles migrated from another PC.
    Open Command Prompt as Administrator.
    Run (replace USERNAME with your actual user):
    icacls "C:\Users\USERNAME\OneDrive" /reset /T /C
    This resets every file and subfolder in OneDrive to inherited permissions — usually clears 0x80070005 immediately.

  5. Check antivirus quarantine.

    Open your antivirus dashboard and look for recent quarantine entries.
    If a file you wanted to sync was quarantined, restore it (only if you know it's safe).
    Then add an exclusion for the OneDrive folder so it doesn't happen again.

Frequently Asked Questions

Why did this start after I switched PCs?

When you copy a OneDrive folder from one PC to another, NTFS file ACLs reference the old user's SID — which doesn't exist on the new PC.
Windows blocks reads with 0x80070005.
The icacls /reset command in step 4 fixes this by replacing the orphan SIDs with inherited permissions from the new user profile.