Access is denied
This error matches known, documented patterns with reliable solutions.
Quick Fix (Most Common Solution)
- Run as administrator
- Take ownership of file/folder
Seeing "Access is denied"? This error can be frustrating, but it's usually fixable. It typically affects your development workflow or system. Below you'll find clear, step-by-step solutions to resolve this issue.
What This Error Means
You do not have the required permissions for this operation.
Commonly reported in Chrome, Edge, and Firefox.
Not affiliated with browser, OS, or device manufacturers.
New here? Learn why exact error messages matter →
Common Causes
- User account lacks permissions
- File owned by system
- Security software blocking
How to Fix
- Run as administrator
- Take ownership of file/folder
- Check security software settings
Last reviewed: March 2026 How we review solutions
Why This Happens
Windows "Access Denied" is a broad error that surfaces whenever a process lacks the necessary permissions to perform a requested operation. Unlike Unix systems where permissions are relatively simple (owner/group/others with read/write/execute bits), Windows uses a layered security model with multiple potential blockers. User Account Control (UAC) is the most visible layer: even if you are logged in as an administrator, processes run with standard user privileges by default and must be explicitly elevated. File and folder Access Control Lists (ACLs) form the second layer—each file has a security descriptor specifying which users and groups can read, write, execute, or take ownership. The SYSTEM account, TrustedInstaller, and service accounts often own critical system files, making them inaccessible even to local administrators without taking ownership first. Antivirus and endpoint protection software adds a third layer by intercepting file operations and blocking access to files it considers suspicious, even when the user has full ACL permissions. Windows file locks from running processes prevent modification of executables and DLLs that are currently loaded in memory. Finally, folder redirection and drive mapping in corporate environments can produce Access Denied when group policies restrict access to redirected locations or when network shares require authentication that has expired.
Quick Diagnostic Checklist
- Right-click the application and select "Run as administrator"
- Check file ownership: Properties > Security > Advanced > Owner
- Look for file locks: try closing related applications or use Process Explorer
- Temporarily disable antivirus to test if it is blocking the operation
- Verify your user account is in the Administrators group
- Check for group policies: run gpresult /r in an elevated command prompt
Diagnosing and fixing Access Denied on Windows
REM Error:
REM "Access is denied" when trying to delete a file in C:\Program Files\
REM Step 1: Try running the command prompt as Administrator
REM Right-click Command Prompt > Run as administrator
REM Step 2: Check who owns the file
icacls "C:\Program Files\MyApp\config.dat"
REM Output: BUILTIN\Administrators:(F)
REM NT SERVICE\TrustedInstaller:(F)
REM ^^^^^^^^^^^^^^^^^^^^^^^^^^ TrustedInstaller owns it
REM Step 3: Take ownership (requires admin)
takeown /f "C:\Program Files\MyApp\config.dat"
REM SUCCESS: The file now belongs to your account
REM Step 4: Grant yourself full control
icacls "C:\Program Files\MyApp\config.dat" /grant %USERNAME%:F
REM Step 5: Now delete or modify the file
del "C:\Program Files\MyApp\config.dat"
REM Step 6: Check for file locks (if above still fails)
REM Download Process Explorer from Microsoft Sysinternals
REM Find > Find Handle or DLL > search for the filename
REM Close the locking process, then retry
Edge Cases & Unusual Scenarios
Ransomware protection blocking writes
Windows 10/11 Controlled Folder Access blocks unauthorized applications from writing to protected folders (Documents, Desktop, etc.). Add your application to the allowed list in Windows Security > Virus & threat protection > Ransomware protection.
OneDrive Files On-Demand sync conflict
Files marked as "cloud only" in OneDrive may return Access Denied if the sync client is not running or if there is a sync conflict. Right-click the file, select "Always keep on this device," and wait for the download to complete.
Inherited deny permissions
Windows ACLs support explicit Deny entries which override Allow entries. A parent folder with a Deny rule passes it down to all children. Check the Advanced Security settings for red Deny entries and remove them if they were added in error.
Optional follow-up
Some users ask whether saving fixes for recurring errors would be useful when the same issue appears again.
Was this explanation helpful?
Frequently Asked Questions
How do I run as admin?
Right-click and select Run as administrator.
Why is admin not enough?
Some operations require TrustedInstaller or special permissions.
What is TrustedInstaller and why does it own system files?
TrustedInstaller is a Windows service account that owns protected system files. Even administrators cannot modify these files without first taking ownership. This prevents accidental or malicious modification of critical Windows components.
Why does Access Denied happen even when I am an administrator?
UAC runs processes with standard user privileges by default. Being in the Administrators group does not automatically grant admin privileges to every process. You must explicitly elevate by right-clicking and selecting Run as administrator.
How do I fix Access Denied errors in PowerShell scripts?
Start PowerShell as administrator, or use Start-Process with the -Verb RunAs parameter to launch an elevated instance from within a script. For file operations, ensure the execution policy allows script execution: Set-ExecutionPolicy RemoteSigned.
Also Known As
- Windows error
- Windows system error
- Windows PC error
- Microsoft Windows error
Common Search Variations
- "windows blue screen fix"
- "windows error code meaning"
- "windows 10 error solution"
- "windows update failed"
- "fix windows system error"
- "windows crash how to fix"
Related Errors
Still Stuck?
Paste a different error message or upload a screenshot to get help instantly.