Windows 0x80070005Medium

Error Access Denied

[object Object]

Medium

What Does the 'Access Denied' Error Mean

The 'Access Denied' error (code 0x80070005 or 5) occurs when the Windows operating system does not allow your user account to perform an operation (read, write, execute) on a file, folder, registry key, or other system object.

Typical scenarios where it appears:

  • When trying to open, save, or delete a file/folder.
  • When launching a program installer or the program itself.
  • When accessing a network share or printer.
  • In a console (PowerShell, CMD) when executing a command that requires elevated privileges.
  • In the Windows installer or during a system update.

The full error text may vary: Access is denied, Failed to access..., You don't have permission to perform this action.

Causes

The error is not a 'bug', but an intentional security mechanism. Here are the specific causes:

  1. Insufficient user permissions (ACL). The user account is not part of the group to which the system has assigned permissions on the object (e.g., only Administrators have access).
  2. Object ownership (Take Ownership). You are not the owner of the file/folder, and the current owner has no permissions configured for your user account.
  3. User Account Control (UAC). Even if you are an administrator, you operate in a standard context. For critical operations, explicit privilege elevation ("Run as administrator") is required.
  4. Blocking by antivirus/Windows Defender. Real-time protection (RTP) implementation may temporarily block access to suspicious or active files.
  5. Corruption of ACL or metadata. A system crash, improper program termination, or virus attack could have damaged the access control lists.
  6. File locked by another program. The file is in use by another process (e.g., open in another program), and the system will not let you modify/delete it.
  7. Network restrictions. When accessing network resources, share permissions or another user's credentials may be applied.
  8. Corruption of system files. Damage to ntoskrnl.exe, sam.sys, or other security-related components.

Solutions

We recommend starting with the simplest and safest method and progressing to more complex ones.

Method 1: Run as Administrator

This is the first thing to try. Many system and even user folders (e.g., C:\Program Files, C:\Windows, C:\Users\Public) require elevated privileges for writing.

  1. Locate the file, program, or folder you cannot access.
  2. Right-click on it.
  3. Select "Run as administrator" (for programs) or open PropertiesSecurity tab → Advanced and try to change the owner/permissions (the system will request UAC confirmation).
  4. If the operation succeeds, the problem was insufficient permissions in the current session.

Method 2: Changing Permissions (ACL) via the Graphical Interface

If running as administrator didn't help, you need to explicitly grant permissions to your user account.

  1. Right-click on the file or folderProperties.
  2. Go to the Security tab.
  3. Click Edit (or Advanced for finer control).
  4. In the "Group or user names" list, click Add.
  5. In the "Enter the object names to select" field, enter:
    • Your username (e.g., John), or
    • The Users group (for all standard users), or
    • The Administrators group.
  6. Click Check NamesOK.
  7. Select the added entry and check the required permissions at the bottom. For full control, select Full control or Read & execute / Modify.
  8. Click ApplyOK. UAC confirmation may be required.
  9. If you are changing the owner in Advanced, check the box "Replace owner on subcontainers and objects" for recursion.

Method 3: Taking Ownership and Resetting Permissions via Command Line (icacls)

This is the most powerful and universal method, working even with unresponsive interfaces.

  1. Open Command Prompt (cmd) or PowerShell as administrator. (Right-click the shortcut → "Run as administrator").
  2. To take ownership (if you are not the owner):
    takeown /F "full_path_to_file_or_folder" /R /D Y
    
    • /F — specifies the path.
    • /R — recursively for all subfolders and files.
    • /D Y — automatically answer 'Yes' to all confirmation prompts.
  3. To reset and assign permissions (most common scenario):
    icacls "full_path_to_file_or_folder" /reset /T /C
    
    • /reset — resets ACLs to default inherited from parent.
    • /T — applies to all subfolders and files.
    • /C — continues on errors (skips files still inaccessible).
  4. To explicitly grant permissions (e.g., full access to the Users group):
    icacls "full_path_to_file_or_folder" /grant "Users":(F) /T /C
    
    • (F) — full control. Alternatives: (M) — modify, (RX) — read & execute, (R) — read only.

Example: For the folder D:\Projects\MyApp:

takeown /F "D:\Projects\MyApp" /R /D Y
icacls "D:\Projects\MyApp" /grant "Users":(M) /T /C

Method 4: Checking and Disabling Antivirus / Windows Defender

Antivirus software often "intercepts" file access for scanning, which can conflict with other programs.

  1. Open your antivirus control panel (Avast, Kaspersky, ESET, etc.) or Windows Security (Win + S → "Windows Security").
  2. Find the Real-time protection, Antivirus protection, or App & browser control section.
  3. Temporarily disable this protection (for 5-10 minutes).
  4. Try to perform the action that caused the error.
  5. If the error disappears, do not leave the antivirus disabled! Instead:
    • Add the path to the problematic folder/file to your antivirus exclusions.
    • In Windows Defender: "Virus & threat protection" → "Manage settings" under "Virus & threat protection settings" → "Add or remove exclusions" → "Add an exclusion" → "Folder".

Method 5: Checking System File and Disk Integrity

If the error affects system objects or appeared after a crash, file corruption may be the cause.

  1. Run System File Checker (SFC):
    • Open Command Prompt as administrator.
    • Enter the command: sfc /scannow
    • Wait for completion (may take 10-20 minutes). The system will attempt to automatically repair corrupted files.
  2. Run Disk Check (CHKDSK):
    • In the same Command Prompt: chkdsk C: /f (replace C: with the appropriate drive letter).
    • If the disk is in use, the system will offer to schedule the check on the next reboot. Agree (Y) and restart your computer.
  3. After reboot, the check will run automatically. Then retry the access.

Prevention

To minimize the risk of the 'Access Denied' error:

  • Work in the correct context. For installing programs, changing system settings, or working with files in protected folders (Program Files, Windows), always use "Run as administrator".
  • Follow the principle of least privilege. Do not use an administrator account for daily work. Use a standard account and elevate privileges only when necessary (UAC).
  • Configure antivirus exclusions for folders with development software, game mods, or frequently changing data that the antivirus might mistakenly block.
  • Regularly create system restore points. This allows quick rollback if the error was caused by a failed permission change or software installation.
  • Do not change permissions on system folders (C:\Windows, C:\Program Files) unless absolutely necessary. This can disrupt OS functionality and create security vulnerabilities.
  • Use standard paths for user data. Store documents, projects in folders within C:\Users\YourName\ (Documents, Downloads, Desktop). Your user account already has full access to these.

F.A.Q.

What's the difference between 'Access Denied' and 'Access is Denied'?
Do I need to disable antivirus to fix it?
Can I fix it via command line without the GUI?
Why does the error appear on Program Files system folders?

Hints

Run the program or File Explorer as an administrator
Check and change access permissions (ACL) via Properties
Take ownership of the object
Reset and set permissions via command line (icacls)
Check antivirus and Windows Defender
Restore system or run disk check

Did this article help you solve the problem?

FixPedia

Free encyclopedia for fixing errors. Step-by-step guides for Windows, Linux, macOS and more.

© 2026 FixPedia. All materials are available for free.

Made with for the community