Fix Access Denied on Windows and Restore File Access
In this article
Yes, you can fix 'Access Denied' on Windows and restore file access by taking ownership of the file or folder and adjusting permissions—this works when you’re locked out of your own files despite being an administrator. Before starting, ensure you’re signed in as an administrator, as standard user accounts cannot change ownership or permissions. Some files, especially system files or those used by running programs, may require a reboot or safe mode to modify. Back up important data first if possible, as incorrect permission changes can affect system stability.
What You'll Need
- Administrator account on the Windows PC
- Access to the file or folder showing 'Access Denied'
- Optional: external drive or cloud storage for backup
Step-by-Step
- Right-click the file or folder that shows 'Access Denied' and select Properties.
- Go to the Security tab. Click Advanced at the bottom.
- In the Advanced Security Settings window, look for the Owner field. Click the link next to it (e.g., 'Current owner: SYSTEM').
- Click Change next to the owner name.
- In the 'Select User or Group' window, type your username in the 'Enter the object name to select' box. Click Check Names to verify it resolves correctly, then click OK.
- Back in the Advanced Security Settings, check the box labeled Replace owner on subcontainers and objects if you're applying this to a folder with multiple files.
- Click Apply, then OK. You may see a permissions warning—click Yes to confirm.
- Return to the Security tab in Properties. Click Edit to change permissions.
- Click Add, type your username, click Check Names, then OK.
- Select your username in the list, then check the box for Full control under 'Allow'.
- Click Apply, then OK. Close all windows.
- Try opening or modifying the file again. If access is still denied, restart your computer and try again.
Common Mistakes
- Not using an administrator account: Only admin accounts can change ownership and permissions.
- Forgetting to check 'Replace owner on subcontainers and objects': This is essential when unlocking entire folders.
- Typing the wrong username: Use the exact account name shown in Settings > Accounts. Domain accounts may require full format (e.g., 'DOMAIN\username').
- Applying changes to the wrong location: Always verify the file path before making changes.
- Ignoring active file locks: If a file is in use by another program, close it first or reboot into safe mode.
Tips
- Use Safe Mode if you can’t access system folders: Restart and hold Shift while clicking Restart, then go to Troubleshoot > Advanced Options > Startup Settings > Restart > Enable Safe Mode.
- Take ownership of parent folders first: If a nested file is locked, changing the top-level folder’s ownership often resolves it faster.
- Use Command Prompt (as admin) for batch changes: Run
takeown /f "C:\path\to\folder" /r /d yto take ownership of a folder and all contents. - After gaining access, back up critical files immediately in case permissions get reset.
- For external drives, ensure they are not write-protected via hardware switch or disk policy.
Troubleshooting
If access is still denied after following the steps:
- Restart your PC: Sometimes permission changes don’t apply until after a reboot.
- Check if the file is in use: Open Task Manager and end any processes using the file. For system files, boot into Safe Mode and try again.
- Verify disk health: Run
chkdsk C: /fin Command Prompt (as admin) to fix file system errors. - Scan for malware: Some viruses lock files by changing ownership. Run a full scan with Windows Security.
- Try another admin account: If your account is corrupted, use a different admin to take ownership.
- Check encryption (EFS): If the file is encrypted, only the original user can decrypt it. Look for a lock icon on the file. If present, you’ll need the original account or certificate to access it.
- Reset folder permissions via Command Prompt: Use
icacls "C:\path\to\folder" /reset /t /c /lto restore default permissions recursively.
Frequently Asked Questions
Can I fix access denied without administrator rights?
No. Administrator privileges are required to change ownership and permissions. If you don’t have an admin account, you cannot legally regain access on a Windows system.
Why do I get access denied even as an administrator?
Windows restricts certain system files by default. You must explicitly take ownership and grant yourself permissions, even as an admin.
Does taking ownership delete the file?
No. Taking ownership only changes who controls the file. The data remains intact.
Can I fix access denied on an external drive?
Yes. Follow the same steps, but ensure the drive isn’t write-protected and is formatted with NTFS. FAT32 does not support file permissions.
What if the file is encrypted?
If the file has a lock icon, it’s encrypted with EFS. Only the original user or a recovery agent can decrypt it. Back up encryption certificates to avoid permanent loss.
Will this work on Windows 10 and 11?
Yes. The steps are identical on both Windows 10 and 11. Menu labels may vary slightly by update version, but the process remains the same.