0x80070005 — Access is denied when opening or saving a file The process does not have permission on the file or the folder holding it.
Why it happens
- The file is on a network share with a different user context
- The ACL was rewritten by a sync client
- Antivirus is holding a lock on the file
Work through these in order
- Check the folder’s Security tab and add your account
- If it is a roaming profile folder, reset the ACL with icacls
- Copy the file to a local folder and open it there
If it comes back
Set the ACL once, on the folder, rather than per file.
Checked 2026-10-05 — R. Okonkwo.
Before changing anything
The code above is what an application reports; it is not a diagnosis of what went wrong. Two checks are worth doing before permissions are touched: whether the file is on a volume the application can actually reach, and whether the file was moved or renamed since it was last opened. Both report as this code more often than a permission problem does.
Pages in this section describe the code as applications report it. Where a fix is listed here, it is one the library has seen work on a real file; where nothing has been confirmed, the page says so instead of guessing at a cause.