> For the complete documentation index, see [llms.txt](https://fixerrors-now.gitbook.io/fixerrors-now-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fixerrors-now.gitbook.io/fixerrors-now-docs/how-to-fix-the-0x80070005-access-denied-error-in-a/how-to-fix-the-0x80070005-access-denied-error-in-a-folder.md).

# How to Fix the 0x80070005 Access Denied Error in a Folder?

Fixing the 0x80070005 (Access Denied) error in Windows comes down to taking back ownership and permissions for the locked folder.

<figure><img src="https://1731445889-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5KZ1ks1hDMKjsP9iDGMI%2Fuploads%2FPuIwagngTDfyKNUhbRqk%2FScreenshot%202026-10-06%20120249.png?alt=media&amp;token=eab9d040-bd01-4248-a71d-c7ee6c86dfe0" alt=""><figcaption></figcaption></figure>

**Here are the 4 fastest ways to fix it, ranked from easiest to most advanced.**

### Fix 1: Take Ownership of the Folder (Most Effective)

When Windows revokes your permission to open or modify a folder, claiming ownership usually fixes the issue immediately.

1. Right-click the locked folder and select Properties.
2. Go to the Security tab and click Advanced near the bottom.
3. Look at the Owner line at the top. Click Change.
4. Type your Windows username into the box, click Check Names, and hit OK.
5. Check the box that says "Replace owner on subcontainers and objects".
6. Click Apply, then OK.

### Fix 2: Grant Full Control Permissions

If changing ownership isn't enough, ensure your account has full read and write access.

1. Right-click the folder $$ $\rightarrow$ $$ Properties $$ $\rightarrow$ $$ Security tab.
2. Click Edit... under the Group or user names list.
3. Select your username from the list.
4. Under Permissions for \[User], check the Allow box next to Full Control.
5. Click Apply and OK.

### Fix 3: Take Ownership via Command Prompt (1-Minute Fix)

If the File Explorer interface is frozen or unhelpful, force ownership through Command Prompt.

1. Press `Win + S`, type cmd, right-click Command Prompt, and select Run as Administrator.
2. Run this command (replace `C:\YourFolderPath` with the path to your folder):

Bash

```
takeown /f "C:\YourFolderPath" /r /d y
```

3. Next, reset all permissions for your user account by running:

Bash

```
icacls "C:\YourFolderPath" /grant administrators:F /t
```

### Fix 4: Turn Off Unrelated Antivirus Blocks

Sometimes third-party antivirus software (or Windows Defender's *Controlled Folder Access*) flags legitimate administrative actions as a security threat.

1. Search for Windows Security in your Start menu.
2. Go to Virus & threat protection.
3. Under *Ransomware protection*, click Manage ransomware protection.
4. Temporarily turn off Controlled folder access and try opening or editing your folder again.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://fixerrors-now.gitbook.io/fixerrors-now-docs/how-to-fix-the-0x80070005-access-denied-error-in-a/how-to-fix-the-0x80070005-access-denied-error-in-a-folder.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
