OtherMedium

Access Denied Error: 6 Proven Ways to Fix It

The 'Access Denied' error occurs when the current user lacks sufficient permissions to perform an operation on a file, folder, or system resource. In this article, you will find detailed causes and working solutions for Windows, macOS, and Linux.

Updated at February 15, 2026
10-15 min
Easy
FixPedia Team
Применимо к:Windows 10/11macOS 12+Ubuntu 20.04+Any software requiring file system access

What Does the "Access Denied" Error Mean

The "Access Denied" error is a system message that appears when the current user or process does not have the necessary permissions to perform an operation on a file, folder, registry, or other system resource. The exact text of the error may vary depending on the program or operating system:

  • In Windows: Error 0x80070005: Access is denied or simply Access is denied.
  • In macOS/Linux: Permission denied or Operation not permitted.

The error can occur when attempting to:

  • Run or install a program.
  • Delete, rename, or move a file/folder.
  • Access a network resource or printer.
  • Change system settings or the registry.

Common Causes

The causes of the "Access Denied" error are usually related to security restrictions. Here are the specific scenarios:

  1. Insufficient user privileges
    You are working under a standard account without administrator rights, but the operation requires elevated privileges (e.g., writing to the system folder C:\Program Files).
  2. Protection of system files and folders
    Some files and folders (e.g., C:\Windows, /etc in Linux) are protected by the system. Even an administrator must explicitly confirm access via UAC (User Account Control) in Windows.
  3. Antivirus or firewall blocking access
    Antivirus programs (including Windows Defender) may mistakenly consider an action a threat and block access to a file or process.
  4. File locked by another program
    If a file is open in another application (e.g., a document in Word), the system will prevent its deletion or modification to avoid data loss.
  5. Corrupted permissions (ACL) or file system
    Access Control Lists (ACL) may have been modified incorrectly, or there may be disk errors (bad sectors), leading to failures when accessing files.
  6. Software or driver conflicts
    Two programs might try to simultaneously gain exclusive access to the same resource (e.g., a port or device driver).

Solutions

Solution 1: Run the Program as Administrator

The simplest and most common way to bypass restrictions is to run the program or installer with administrator privileges.

  1. Locate the executable file (.exe, .msi) or shortcut.
  2. Right-click on it.
  3. Select "Run as administrator".
  4. If a UAC prompt appears, click "Yes".

💡 Tip: To always run the program as an administrator, open its PropertiesCompatibility tab → check "Run this program as an administrator".

Solution 2: Check and Modify File/Folder Permissions

If the error is related to a specific file or folder, check the assigned permissions.

In Windows:

  1. Right-click the file/folder → "Properties".
  2. Go to the "Security" tab.
  3. In the "Group or user names" list, find your user account.
  4. Click "Edit", select your account, and in the lower table set the required permissions (e.g., "Full control" or "Read & execute").
  5. Click "Apply" and "OK".

In Linux/macOS (via terminal):

# Show current permissions
ls -la /path/to/file

# Change file owner (requires sudo)
sudo chown $USER /path/to/file

# Grant read/write permissions to everyone
sudo chmod 755 /path/to/file   # for files
sudo chmod 755 /path/to/folder # for folders

Solution 3: Temporarily Disable Antivirus and Firewall

Antivirus programs may block access to files, mistakenly identifying them as malicious.

Windows Defender (built-in antivirus):

  1. Open Control PanelSecurity and MaintenanceWindows Security.
  2. Under "Virus & threat protection", click "Manage settings".
  3. Turn off "Real-time protection" (temporarily).
  4. Repeat the action that caused the error.
  5. Remember to turn protection back on!

Third-party antiviruses (Avast, Kaspersky, etc.):
Find the antivirus icon in the system tray (near the clock), open its control panel, and look for an option to disable protection (usually for 10-15 minutes).

⚠️ Important: Only disable the antivirus for diagnostic purposes. If the error disappears, add the problematic program or folder to the antivirus's exclusions list, then re-enable protection.

Solution 4: Take Ownership (Takeown) and Reset Permissions (Icacls)

For system files or files owned by another user (e.g., TrustedInstaller in Windows), use the command prompt as administrator.

  1. Press Win + R, type cmd, and press Ctrl + Shift + Enter (run as administrator).
  2. Execute the command, replacing C:\path\to\file with the actual path:
    takeown /f "C:\path\to\file" /r /d y
    
    This command makes the current user the owner of the file/folder.
  3. Then grant full access:
    icacls "C:\path\to\file" /grant administrators:F /t /c
    
    F means full control, /t applies recursively to all subfolders/files, /c continues on errors.

Example for folder C:\Program Files\OldProgram:

takeown /f "C:\Program Files\OldProgram" /r /d y
icacls "C:\Program Files\OldProgram" /grant administrators:F /t /c

Solution 5: Find and Terminate the Process Locking the File

If a file is in use by another program, the system will not allow changes to it.

  1. Download Process Explorer from Microsoft.
  2. Run procexp.exe as administrator.
  3. Press Ctrl + F (or go to Find → Find Handle or DLL...).
  4. Enter the filename (e.g., document.docx) and click Search.
  5. In the results, find the process holding the file (e.g., WINWORD.EXE).
  6. Right-click the process → "Close Handle" (closes the file but not the program itself).
    Or terminate the process via "Kill Process" (this will close the program, so save your data first!).

Solution 6: Check Disk and Repair System Files

File system corruption or damaged system files can cause access errors.

In Windows (as administrator):

# Check and repair disk C: (requires reboot)
chkdsk C: /f

# Check system file integrity
sfc /scannow

In Linux:

# Check disk (replace /dev/sda1 with your partition)
sudo fsck /dev/sda1

# Restore permissions for system files (if corrupted)
sudo dpkg --configure -a   # for Debian/Ubuntu
sudo rpm --rebuilddb       # for RHEL/Fedora

Solution 7: Boot into Safe Mode

If the error is caused by third-party software or a driver, boot into Safe Mode (minimal set of drivers and services) and perform the action there.

Windows:

  1. Press Win + R, type msconfig, go to the "Boot" tab.
  2. Select "Safe boot""Minimal".
  3. Restart the computer.
  4. After fixing the issue, revert the settings in msconfig.

macOS:
Hold the Shift key during startup until the Apple logo appears.

Linux:
At the boot screen (GRUB) select "Advanced options""Recovery mode" or "Safe mode".

Prevention

To avoid the "Access Denied" error in the future:

  • Use a standard user account for daily tasks — don't work permanently as an administrator. Only use elevated privileges for installing software or making system changes.
  • Do not disable UAC (User Account Control) in Windows — it's an important security layer that warns about risks.
  • Regularly update your antivirus and system — newer versions better recognize legitimate programs.
  • Avoid running two antiviruses simultaneously — they conflict and may block file access.
  • Do not manually change permissions on system folders (C:\Windows, C:\Program Files, /etc, /bin) unless you are sure of the consequences.
  • Before deleting files, ensure they are not open in other programs — use the "Preview pane" in File Explorer or Process Explorer.

F.A.Q.

Why does the 'Access Denied' error occur when trying to delete a file?
Can the 'Access Denied' error be fixed without administrator rights?
Can an antivirus cause the 'Access Denied' error?
What to do if the 'Access Denied' error persists after all manipulations?

Hints

Run the program as an administrator
Check file/folder permissions
Temporarily disable antivirus and firewall
Take ownership of the file via Command Prompt
Find the process locking the file
Run disk check and system file integrity scan
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