High
Operating Systems
✓ Solution Verified by Community (0+ upvotes)
How to fix error error-access-denied in Windows 11
ERROR_ACCESS_DENIED = 5
Fix based on community reports and expert analysis. Last verified: 2026-08-12
· How we verify fixes
| Error Code | error-access-denied |
|---|---|
| Affected System | Windows 11 (Microsoft) |
| Difficulty | High |
| Estimated Time | 20 min |
| Requires Admin Rights | ⚠️ Yes |
Solution Steps
- 1 Right-click on the file or program that gives the error and select 'Properties'. Go to the 'Security' tab and click 'Advanced'. At the bottom, click 'Change' next to 'Owner'. Type your username and click 'Check Names', then OK. This gives you ownership of the file, which is often the root cause of access denied.
- 2 In the same Advanced Security Settings window, click 'Add' to add a new permission entry. Click 'Select a principal', type 'Everyone', and click OK. Then check the 'Full control' box under 'Basic permissions'. Click OK and apply. This grants full access to all users, but you can later restrict it if needed.
- 3 Press Windows key + R, type 'cmd', and press Ctrl+Shift+Enter to open Command Prompt as administrator. Type 'sfc /scannow' and press Enter. This scans and repairs protected system files that might be causing the access issue.
- 4 If the error occurs when running a program, right-click the program's shortcut and select 'Run as administrator'. This gives the program elevated privileges to access protected resources.
- 5 If the error occurs in a specific folder, try taking ownership of that folder using the command 'takeown /f "C:\path\to\folder" /r /d y' and then granting permissions with 'icacls "C:\path\to\folder" /grant administrators:F /t'.
🔍 Didn't work? Enter your GPU and CPU for hardware-specific advice:
🔧 Still having issues?
Describe your exact problem to Error Buddy and get a personalized fix in seconds.
🛠️ Try Error Buddy — It's Free