WindowsMedium

Fixing Access Denied Error in Windows: Complete Guide

The article explains why the 'Access Denied' error occurs in Windows and provides several effective solutions—from adjusting permissions to taking ownership of files.

Updated at February 16, 2026
15-30 min
Medium
FixPedia Team
Применимо к:Windows 10Windows 11Windows Server 2016+

What the Access Denied Error Means

The Access Denied error is a general Windows message that appears when the system or an application cannot grant the requested access to a file, folder, registry key, device, or network resource. Instead of it, codes like 0x80070005 (E_ACCESSDENIED) may be displayed, but the essence is the same: the current user or process lacks sufficient privileges.

The error can occur in different contexts:

  • When opening, copying, deleting, or renaming files/folders.
  • When launching programs or installing software.
  • When accessing a registry section.
  • In browsers when opening local files or network resources.
  • When working with Command Prompt or PowerShell.

Typical text: Access is denied.

Causes

The Access Denied error occurs for several specific reasons:

  1. Insufficient user privileges — you are working under a standard account without administrator rights, and the operation requires elevated privileges (for example, modifying files in C:\Program Files or C:\Windows).
  2. Lock by another process — the file or folder is in use (locked) by another program (for example, an antivirus, system process, or editor) that does not allow simultaneous access.
  3. Corrupted or incorrect Access Control Lists (ACL) — the security settings of the object (file/folder) lack an entry for your user or the groups you belong to.
  4. User Account Control (UAC) — even as an administrator, you run processes with limited rights unless you explicitly confirm elevation. Some system operations require explicit UAC consent.
  5. Antivirus or firewall — security tools may mistakenly block access to files they consider suspicious or to network resources.
  6. System or protected resources — attempting to modify files in Windows system directories, the C:\ root, or registry objects protected by the system.
  7. Corruption of system files — a Windows malfunction causing the permission verification mechanism to work incorrectly.

Solutions

Solutions are ordered from simple and quick to more complex. Start with the first method and proceed further if the problem persists.

Method 1: Run the Program or File Explorer as Administrator

This is the fastest method if the error occurs when launching a specific application or working with files in protected locations.

Steps:

  1. Find the program's executable file (.exe) or shortcut.
  2. Right-click on it and select "Run as administrator".
  3. If prompted, enter the administrator password or confirm the action in UAC.
  4. For File Explorer (Windows Explorer), you can also run it as administrator: in the Start menu, find "File Explorer", right-click → "Run as administrator". After that, try performing the file operation.

💡 Tip: To always run the program with elevated privileges, open its properties (right-click the shortcut → "Properties"), go to the "Compatibility" tab, and check "Run this program as an administrator".

Method 2: Change Permissions for the File or Folder

If the error relates to a specific file or directory, you need to explicitly grant your user the necessary permissions.

Steps:

  1. Find the problematic file or folder in File Explorer.
  2. Right-click on it → "Properties".
  3. Go to the "Security" tab.
  4. Click "Edit" (or "Add" if your user is not in the list).
  5. In the dialog box, click "Add", enter your username (for example, Username or Users) in the "Enter the object names to select" field, and click "Check Names" → "OK".
  6. Select the added user and at the bottom set the required permissions. For full access, check "Full control".
  7. Important: to apply permissions to all subfolders and files, click "Advanced", then "Replace all child object permission entries..." and confirm.
  8. Click "Apply" and "OK" in all windows.

Method 3: Taking Ownership of the File (takeown command)

If the file or folder belongs to another user (for example, SYSTEM) and standard permission changes do not help, use Command Prompt with administrator rights to become the owner.

Steps:

  1. Open Command Prompt (cmd) or PowerShell as administrator (Start → type "cmd" → right-click → "Run as administrator").
  2. Execute the command, specifying the path to the object. For example, for the file C:\test\file.txt:
    takeown /f "C:\test\file.txt" /r /d y
    
    • /f — specifies the file or folder.
    • /r — recursively for nested items (relevant for folders).
    • /d y — automatically confirms prompts when taking ownership.
  3. After taking ownership, grant yourself full permissions using icacls:
    icacls "C:\test\file.txt" /grant "%USERNAME%":F
    
    • %USERNAME% — automatically inserts the current user's name.
    • F — means full control.
  4. For a folder with subfolders and files, you can combine:
    takeown /f "C:\test" /r /d y && icacls "C:\test" /grant "%USERNAME%":F /t
    
    (/t — applies to all nested objects).

⚠️ Important: Be careful with system files (for example, in C:\Windows). Taking ownership of them may disrupt system operation. Apply only to objects you are sure about.

Method 4: Temporarily Disable UAC and Antivirus

If the error is caused by aggressive security settings, you can temporarily disable them for diagnostics.

Disabling UAC:

  1. Open Control Panel"User Accounts""Change User Account Control settings".
  2. Move the slider down to "Never notify".
  3. Restart your computer.
  4. Try performing the problematic operation. If the error disappears, UAC was the culprit. Return the slider to its previous level (recommended not lower than level 3) and correctly configure permissions as in Method 2.

Disabling antivirus/firewall:

  1. Open your antivirus interface (for example, "Windows Defender", Kaspersky, Avast).
  2. Find real-time protection or firewall settings.
  3. Temporarily disable (usually for 10-15 minutes).
  4. Check if the error is resolved. If yes, add an exception for the needed file/program/folder in the antivirus settings and re-enable protection.

Method 5: Check and Repair System Files

Corruption of Windows system components can cause access errors even for regular files.

Steps:

  1. Open Command Prompt or PowerShell as administrator.
  2. Run a system file integrity check:
    sfc /scannow
    
    This tool scans and automatically repairs corrupted system files.
  3. If sfc does not help or reports irreparable errors, use DISM to restore the Windows image:
    DISM /Online /Cleanup-Image /RestoreHealth
    
  4. After DISM completes, restart your computer and run sfc /scannow again for verification.
  5. Try repeating the operation that caused the error.

Prevention

To minimize the risk of the Access Denied error in the future:

  • Do not work permanently as an administrator — use a standard account for daily tasks and request administrator rights only when necessary (UAC).
  • Store user files in profile folders (Documents, Downloads, Desktop) or on separate partitions, not in system directories (C:\Windows, C:\Program Files).
  • Avoid manually changing permissions on system objects — if needed, use official methods (for example, program installers).
  • Regularly update Windows and your antivirus — updates often contain fixes for security components.
  • When installing programs, always use official sources — pirated or modified software may attempt to change access permissions without your knowledge.
  • Do not disable UAC completely — it is a critically important protection mechanism. If an application requires permanent UAC disablement, find an alternative or configure its compatibility.

If the problem occurs in a specific program (for example, a browser when downloading files), check its security settings or reinstall it.

F.A.Q.

What causes the Access Denied error in Windows?
Can I disable UAC to solve the problem?
How to grant admin rights to a folder to avoid the error?
Why does Access Denied occur even with admin rights?

Hints

Identify the source of the error
Run as administrator
Change file/folder permissions
Take ownership of the file (takeown)
Check antivirus and firewall

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