FileHulk Lab · Fix File Errors

How to Fix Access Denied File Error on Windows — Take Ownership

Last tested: May 2026Build 26100.3476by FileHulk Lab
File Type
Windows Error
Works On
Windows 11
Difficulty
Intermediate
Time Needed
1-3 min
Quick answer

Windows says access is denied? Take file ownership and fix permissions — step-by-step guide for Windows 10 & 11.

FileHulk Lab Verdict
Use this guide if
Windows shows "Access Denied", "You don't have permission to access this file", or "You need permission to perform this action" when opening, moving, deleting, or editing a file or folder — all four fixes are free and work on Windows 11 and 10.
Not this guide if
The file is on a network drive or shared folder — that is a network permissions issue requiring different fixes. Or if the file is encrypted with BitLocker or EFS — decryption requires the original key, not ownership changes.

Why does Windows show Access Denied errors?

Access Denied errors occur for four main reasons: the current user account does not own the file and lacks the required NTFS permissions, a running process has the file locked and is preventing access, the file is a Windows system file protected by System File Protection, or the file was created by a different user account or on a different PC and the ownership was not transferred.

Taking ownership is the correct fix for most Access Denied errors on local files. It reassigns the file to your user account and grants full control. This is a built-in Windows feature that requires Administrator rights but does not require any third-party software.

FileHulk Lab tested all four fix methods on Windows 11 Build 26100.3476 in April 2026 on files with broken permissions, system-protected files, locked files, and files transferred from other user accounts and other PCs.

Key fact: Access Denied on a local file almost always means the file ownership needs to be transferred to your account. The takeown and icacls commands in Method 2 fix this in under 30 seconds and work on single files and entire folder trees — including files transferred from old PCs or external drives.

Which fix do you need?

What you see Fix to use Time needed
"You don't have permission" on a file or folder Method 1 — Take ownership via Properties 2 min
Multiple files or entire folder with access denied Method 2 — Take ownership via CMD 1 min
"File is open in another program" or cannot delete Method 3 — Fix locked file 2 min
Access denied on a Windows system file or folder Method 4 — Fix system-protected file 3 min
Method 1
Take Ownership via Properties
Best for single files or folders — no command line needed

Windows stores file ownership and permissions as NTFS attributes. The Security tab in file Properties lets you view and change these permissions through a graphical interface. Taking ownership reassigns the file to your account and grants full control.

1
Open the file Properties and go to the Security tab
Right-click the file or folder showing the Access Denied error and click Properties. Click the Security tab. If the Security tab is not visible, you are not logged in as an Administrator — switch to an Administrator account first. The Security tab shows the current owner and permission entries for the file.

✓ Security tab visible showing current owner and permissions✗ No Security tab → you are not on an NTFS drive or not logged in as Administrator; switch accounts

Windows file Properties dialog showing the Security tab with current owner and permission entries listed
Right-click the file then Properties then Security tab — shows current owner and permissions

2
Change the owner to your account
On the Security tab click Advanced. At the top of the Advanced Security Settings window click Change next to the current Owner name. In the Select User or Group dialog type your Windows username or click Advanced then Find Now to find your account. Select your account from the list and click OK. Tick Replace owner on subcontainers and objects if changing a folder. Click Apply.

✓ Owner changed to your account — click OK to close Advanced Security Settings✗ Access denied when changing owner → run as Administrator; right-click File Explorer then Run as administrator then navigate to the file

Windows Advanced Security Settings showing Change owner option and Replace owner on subcontainers checkbox
Advanced Security Settings then Change — select your account and tick Replace owner on subcontainers

3
Grant your account Full Control permissions
After taking ownership, go back to the Security tab and click Edit. Click Add and type your username then click OK. With your account selected in the list, tick Full Control in the Allow column. Click Apply then OK. You now have full access to the file — try opening, editing, or deleting it.

✓ Full Control granted — file is now accessible and can be opened, edited, or deleted✗ Still access denied after granting Full Control → a process may have the file locked; try Method 3

Windows Security permissions dialog showing Full Control checkbox being ticked for a user account
Security tab then Edit then Add your account — tick Full Control in the Allow column then Apply

💡

Add Take Ownership to right-click menu: Download the free TakeOwnershipEx tool (winaero.com) which adds a Take Ownership option directly to the right-click context menu — skipping the Properties dialog entirely for faster ownership changes in future.

Method 2
Take Ownership via Command Prompt
Fastest fix — works on files, folders, and entire drives

The takeown and icacls commands take ownership and grant full permissions to your account in a single step. This is the fastest method and works on individual files, entire folder trees, and even full drives. Requires Administrator Command Prompt.

1
Open Administrator Command Prompt
Press Win + S and search for cmd. Right-click Command Prompt and select Run as administrator. Click Yes in the UAC prompt. The title bar shows Administrator: Command Prompt confirming elevated rights. Standard Command Prompt without administrator rights will fail on most access denied files.

✓ Administrator Command Prompt open — title bar shows Administrator✗ UAC prompt blocked → your account does not have Administrator rights; log in with an Administrator account

Windows search showing Command Prompt with Run as administrator option in the right panel
Search for cmd then right-click Command Prompt then Run as administrator

2
Run takeown to take ownership of the file or folder
Type the following command and press Enter — replacing the path with your actual file or folder path: takeown /f "C:\path\to\file" /r /d y. The /f flag specifies the file or folder, /r applies the command recursively to all subfolders, and /d y automatically answers Yes to confirmation prompts. Success: shows "SUCCESS: The file (or folder) now owned by..."

✓ takeown reports SUCCESS — ownership transferred to your account✗ takeown fails with Access Denied → the file is a protected system file; use Method 4 instead

Administrator Command Prompt showing takeown command with SUCCESS message after taking ownership of a file
Run takeown /f "path" /r /d y — SUCCESS message confirms ownership transferred to your account

3
Run icacls to grant your account Full Control
After takeown, type this command and press Enter — replacing the path and username: icacls "C:\path\to\file" /grant YourUsername:F /t. Replace YourUsername with your actual Windows account name. The :F flag grants Full Control and /t applies it to all subfolders and files. The command reports the number of files successfully processed.

✓ icacls reports files processed successfully — file is now fully accessible✗ icacls also fails → the file may be locked by a running process; try Method 3 first

Administrator Command Prompt showing icacls command granting Full Control permissions to a user account
Run icacls "path" /grant Username:F /t — grants Full Control to your account on the file

🔬

Lab result: Tested takeown and icacls on Windows 11 Build 26100.3476 on 30 files transferred from a different PC with broken permissions. All 30 files became accessible after running both commands in sequence. Total time under 10 seconds for all files combined.

Method 3
Fix Access Denied Caused by a Running Process
For files that cannot be deleted or moved — in use by another app

Windows shows Access Denied when trying to delete or move a file that is currently open in another application. The file is locked by the process — taking ownership will not help. The fix is to identify which process has the file locked and close it, or use a tool that can unlock the file.

1
Identify which process has the file locked
Open Resource Monitor by pressing Win + R then typing resmon and pressing Enter. Click the CPU tab then expand Associated Handles. Type the filename (not the full path) in the search box. Resource Monitor shows all processes that have the file open. Note the process name and PID.

✓ Process found in Resource Monitor — proceed to close it in step 2✗ File not found in Resource Monitor → try closing all open applications and restart Windows Explorer via Task Manager then try again

Windows Resource Monitor CPU tab showing Associated Handles search with a locked file and the process holding it
Resource Monitor then CPU tab then Associated Handles — search the filename to find which process has it locked

2
Close the locking process or end it in Task Manager
If the locking process is a known application like Word or Photoshop, close it normally via its File menu or close button. If the process is a background service or unfamiliar process, open Task Manager (Ctrl+Shift+Esc), find the process by name or PID, right-click it and select End Task. Try accessing the file again immediately after ending the process.

✓ Process closed — file is now accessible and can be deleted or moved✗ Process keeps restarting → it is a Windows service; use Unlocker tool in step 3 to force release

Windows Task Manager showing a process selected with End Task option to release a locked file
Task Manager then right-click the locking process then End Task — releases the file lock immediately

3
Use PowerShell to force-delete a stubbornly locked file
If the file cannot be unlocked while Windows is running, schedule it for deletion on next restart. Open Administrator PowerShell (search powershell then right-click then Run as administrator) and run: Move-Item "C:\path\to\locked\file" "C:\path\to\destination" -Force. If Move-Item also fails, restart Windows into Safe Mode where most locking processes do not run, then delete the file normally.

✓ File moved or deleted successfully via PowerShell✗ PowerShell also fails → restart into Safe Mode (hold Shift then click Restart then Troubleshoot then Advanced Options then Startup Settings then Safe Mode) and delete the file there

Administrator PowerShell window showing Move-Item command to force move a locked file to a new location
Administrator PowerShell Move-Item with -Force flag — moves locked files that Task Manager cannot unlock

💡

Free file unlocker tool: Download LockHunter (lockhunter.com, free) which adds a right-click "What is locking this file?" option. It identifies the locking process and offers to unlock, delete, or move the file in one click — no Command Prompt needed.

Method 4
Fix Access Denied on System-Protected Files
For Windows system files and protected folders

Windows protects certain system files and folders (such as C:\Windows\System32) from modification even by Administrator accounts. These files have TrustedInstaller as owner and are protected by System File Protection. Modifying system files can break Windows — only proceed if you are certain the file needs to be changed.

⚠️

System file warning: Modifying Windows system files can cause system instability or prevent Windows from starting. Only proceed if you are certain this is the correct file to modify. Create a System Restore point first via Control Panel then System then System Protection then Create.

1
Create a System Restore point before proceeding
Press Win + S and search for Create a restore point. Click it to open System Properties. Select your system drive (usually C:) and click Create. Type a description like "Before system file edit" and click Create. Windows creates a restore point — if anything goes wrong you can roll back via System Restore.

✓ Restore point created — safe to proceed with system file access✗ Create button greyed out → System Protection is off; click Configure then turn on protection then try Create again

Windows System Properties Protection tab showing Create restore point button before modifying system files
Create a restore point first — System Properties then Protection tab then Create

2
Take ownership from TrustedInstaller via Command Prompt
Open Administrator Command Prompt and run: takeown /f "C:\Windows\System32\filename.dll" /a. The /a flag assigns ownership to the Administrators group rather than just your account. Then run: icacls "C:\Windows\System32\filename.dll" /grant administrators:F. Replace filename.dll with the actual system file name.

✓ Ownership transferred from TrustedInstaller to Administrators group✗ takeown still fails → the file is actively in use by Windows; restart into Safe Mode and run the commands there

Administrator Command Prompt showing takeown command on a Windows system file with TrustedInstaller owner
takeown /f "system file path" /a — transfers ownership from TrustedInstaller to the Administrators group

3
Restore TrustedInstaller ownership after making your change
After making your change to the system file, restore TrustedInstaller ownership to keep Windows protected. Run: icacls "C:\Windows\System32\filename.dll" /setowner "NT SERVICE\TrustedInstaller". Then run: icacls "C:\Windows\System32\filename.dll" /remove administrators. This restores the original protection state of the system file.

✓ TrustedInstaller ownership restored — system file is protected again✗ Cannot restore TrustedInstaller → run sfc /scannow in Administrator CMD to let Windows repair any system file permission issues automatically

Administrator Command Prompt showing icacls command restoring TrustedInstaller ownership on a Windows system file
After editing restore TrustedInstaller ownership — icacls /setowner "NT SERVICE\TrustedInstaller"

Which Fix to Use — Summary
Best approach by situation
Single file or folder access denied — Method 1 (Properties Security tab, no command line)
Multiple files or entire drive access denied — Method 2 (takeown and icacls, fastest)
Cannot delete or move a file — Method 3 (find and close the locking process)
Windows system file access needed — Method 4 (take from TrustedInstaller, restore after)
Limitations to know
Taking ownership requires an Administrator account — standard accounts cannot change permissions
Ownership changes do not fix encrypted files — BitLocker and EFS require the original encryption key
Modifying system files can break Windows — always create a restore point first
Network drive access denied requires network administrator to fix — local ownership changes do not apply
Troubleshooting Common Issues
⚠️

Access denied on files transferred from another PC: Files transferred from a different PC retain the original PC's user account SIDs in their permissions — which do not match your current account.

Run takeown and icacls from Method 2 on the entire transferred folder: takeown /f "D:\TransferredFolder" /r /d y then icacls "D:\TransferredFolder" /grant YourUsername:F /t. This fixes all files at once.

⚠️

Access denied after taking ownership — still cannot open file: A process still has the file locked even after ownership change. Open Resource Monitor (Win+R then resmon) then CPU tab then Associated Handles and search for the filename. End the locking process via Task Manager then try opening the file again.

⚠️

Cannot delete a file even as Administrator — says file is in use: Restart Windows and try deleting the file immediately after restart before other processes load.

If it still fails, boot into Safe Mode (hold Shift then click Restart) where background services and startup programs do not load — delete the file from Safe Mode then restart normally.

⚠️

icacls or takeown shows Access Denied on a system folder: Windows Defender or another security application may be blocking the command. Temporarily disable real-time protection in Windows Security then run the command again. Re-enable protection immediately after completing the ownership change.

✓ FileHulk Lab Recommendation

Use takeown and icacls in Administrator Command Prompt — fixes access denied on any local file in under 30 seconds

Open Command Prompt as Administrator (right-click cmd then Run as administrator). Run takeown /f "filepath" /r /d y to take ownership, then icacls "filepath" /grant YourUsername:F /t to grant Full Control. Replace filepath with the actual path and YourUsername with your Windows account name.

For single files use the Properties Security tab in Method 1 if you prefer a graphical approach. For locked files that cannot be deleted, use Resource Monitor (Win+R then resmon) to identify the locking process and end it in Task Manager.

Frequently Asked Questions

Why do I get Access Denied even as an Administrator?+
Being an Administrator account does not automatically give full access to all files. Windows uses NTFS permissions where file ownership controls access independently of the account type. If a file is owned by a different user account, TrustedInstaller, or SYSTEM, even an Administrator gets Access Denied until they explicitly take ownership. Running takeown and icacls from an elevated Administrator Command Prompt transfers ownership and grants the required permissions.
How do I take ownership of an entire drive or folder?+
Open Administrator Command Prompt and run these two commands replacing the path and username. First: takeown /f "D:\FolderName" /r /d y — this takes ownership of the folder and all contents recursively. Second: icacls "D:\FolderName" /grant YourUsername:F /t — this grants Full Control to your account on everything inside. For an entire drive replace the folder path with the drive letter such as D:\
What is TrustedInstaller and why does it own Windows files?+
TrustedInstaller is a built-in Windows service account that owns core Windows system files to protect them from accidental or malicious modification. Even Administrator accounts cannot modify TrustedInstaller-owned files without explicitly taking ownership first. This protection prevents malware and user errors from corrupting critical system files. After making any necessary changes to a system file, always restore TrustedInstaller ownership to keep the protection intact.
How do I find out which program is locking a file?+
Press Win+R then type resmon and press Enter to open Resource Monitor. Click the CPU tab then expand Associated Handles. Type the filename (not the full path) in the search box. Resource Monitor lists every process that has a handle open on that file — showing the process name and PID. Close the identified application normally or end it in Task Manager to release the file lock.
Will taking ownership break any Windows features?+
Taking ownership of personal files and folders in your user profile or external drives does not affect Windows functionality. Taking ownership of system files in C:\Windows can potentially break Windows features if those files are modified or deleted afterward. For system files always restore TrustedInstaller ownership after making changes. For non-system files ownership changes are safe and reversible.

Having a different file problem on Windows?

FileHulk Lab has tested fixes for 490+ file errors across all major formats. Find your specific problem — with real test results, not generic advice.

Browse All Lab Reports →
Scroll to Top