“Access Denied” on Your Own Files? Taking Ownership in Windows 11
You double-click a document, photograph or folder that belongs to you, only for Windows 11 to display an unhelpful message:
“Access is denied.”
You may also see warnings such as:
- “You don’t currently have permission to access this folder.”
- “You require permission from an administrator to make changes.”
- “You require permission from SYSTEM or TrustedInstaller.”
- “You do not have permission to open this file.”
This commonly happens after reinstalling Windows, moving a drive from another computer, restoring files from a backup or replacing an old user account. The data may still be intact, but Windows no longer recognises your current account as its owner.
In many cases, the solution is to take ownership of the affected files and then grant your account the correct permissions. However, ownership changes should be made carefully—especially on business computers and inside protected Windows folders.
Why Windows Thinks Your Files Belong to Someone Else
Windows does not identify a user solely by the name shown on the sign-in screen. Each account has its own unique security identifier, known as a SID.
Suppose your previous Windows installation had an account called “Carl”. You reinstall Windows and create another account called “Carl”. Although the visible username is identical, Windows treats the new account as a completely different identity.
Files copied from the previous installation may therefore still be assigned to the old account’s SID. Because that account no longer exists on the new installation, Windows may show the owner as a long string of numbers or as an unknown account.
Other common causes include:
- Connecting an internal drive from an old computer
- Restoring files from a system image or backup
- Copying a user profile manually
- Broken or disabled permission inheritance
- Files created by another administrator
- Files owned by SYSTEM or TrustedInstaller
- Incorrect permissions inside a OneDrive folder
- Company security policies applied to a managed device
- Files encrypted by another Windows account
Before changing ownership, make sure you are authorised to access the files. On a company-owned computer, contact your IT administrator before modifying permissions.
Ownership and Permissions Are Not the Same Thing
Taking ownership does not necessarily give you permission to open, edit or delete a file.
The owner of a file has the authority to change its permissions. The file’s access control list then determines which users can read, write, modify or delete it.
Microsoft’s takeown command can make an administrator the owner of an inaccessible file, but Microsoft notes that you may still need to grant yourself the necessary permissions afterwards. (Microsoft Learn)
The correct repair normally involves two stages:
- Change the file or folder owner.
- Grant your account an appropriate permission level.
Before Taking Ownership: Check the Simple Causes
An “Access Denied” message does not always mean that ownership is wrong.
Restart the computer
A program, background process or update may still be using the file. Restarting Windows releases many temporary file locks.
Close the application using the file
If the problem concerns a Word document, spreadsheet, photograph, database or Outlook data file, close the application that may be using it.
Microsoft notes that OneDrive cannot synchronise a file while another application is actively using it. (Microsoft Support)
Check whether the file is read-only
Right-click the file, select Properties and look at the Attributes section on the General tab. Clear Read-only if it is selected, then choose Apply.
Read-only status is not the same as an NTFS permission problem, but it can stop some applications from saving changes.
Confirm that you are using an administrator account
Open:
Settings > Accounts > Your info
Your account should show Administrator beneath its name. If it does not, you will need an administrator account or assistance from whoever manages the computer.
Check the drive
If the files are on an external drive, confirm that the drive is connected properly and is not physically write-protected. You should also check whether other files on the same drive can be opened.
How to Take Ownership Through File Explorer
The graphical method is the safest approach when only one folder or a small collection of files is affected.
Step 1: Open the advanced security settings
- Right-click the affected file or folder.
- Select Properties.
- Open the Security tab.
- Select Advanced.
The current owner appears near the top of the Advanced Security Settings window.
Step 2: Change the owner
- Next to Owner, select Change.
- Enter your Windows username or the email address associated with your Microsoft account.
- Select Check Names.
- Once Windows recognises the account, select OK.
Alternatively, select:
Advanced > Find Now
You can then choose your account from the list.
Step 3: Apply the ownership change to everything inside the folder
When taking ownership of a folder, select:
Replace owner on subcontainers and objects
This applies the ownership change to files and subfolders beneath the selected folder.
Only enable this option when you are confident that the entire folder should belong to your account. Applying it to a large directory can alter thousands of objects.
Select Apply, approve the administrator prompt and then select OK.
You may need to close and reopen the Properties window before the ownership change appears correctly.
Granting Yourself Permission After Taking Ownership
Once you are the owner, return to:
Properties > Security
Select your account from the list and review the permissions shown underneath it.
If your account is missing:
- Select Edit.
- Select Add.
- Enter your username.
- Select Check Names.
- Select OK.
You can then choose the appropriate access level.
For ordinary personal files, Modify is normally sufficient. It allows you to read, edit and delete files without giving every advanced permission available.
Use Full control only when it is genuinely required.
For folders containing multiple items, return to Advanced Security Settings and check whether inheritance is enabled. Permission inheritance allows files and subfolders to receive appropriate permissions from the parent folder.
Taking Ownership with Command Prompt
For a large folder tree, the command-line method is faster. It is also considerably easier to misuse, so check the path carefully before pressing Enter.
Open Start, type Command Prompt, right-click it and select Run as administrator.
Take ownership of one file
takeown /F "D:\Recovered Files\Accounts.xlsx"
Replace the example path with the real file location.
Take ownership of a folder and everything inside it
takeown /F "D:\Recovered Files" /R /D Y
The switches mean:
- /F specifies the file or folder.
- /R processes files and subfolders recursively.
- /D Y automatically answers yes when Windows encounters a folder it cannot list.
Microsoft documents takeown as a command that allows an administrator to recover access by becoming the owner of a file or folder. (Microsoft Learn)
Granting Permissions with ICACLS
After taking ownership, you can use icacls to grant your account access.
To grant Modify permission to a folder and its contents:
icacls "D:\Recovered Files" /grant "%USERNAME%":(OI)(CI)M /T /C
In this command:
- %USERNAME% uses the currently signed-in Windows account.
- (OI) allows files to inherit the permission.
- (CI) allows subfolders to inherit the permission.
- M grants Modify access.
- /T processes subfolders and files.
- /C continues even when individual errors occur.
For Full control, replace M with F:
icacls "D:\Recovered Files" /grant "%USERNAME%":(OI)(CI)F /T /C
Microsoft confirms that icacls applies to Windows 11 and can display or modify the access control lists attached to files and folders. Its supported permission levels include Read, Write, Modify and Full access. (Microsoft Learn)
Avoid using Full control across an entire system drive. Restrict the command to the smallest relevant personal-data folder.
When You Should Not Take Ownership
Taking ownership is appropriate for recovered documents, photographs, videos and other personal data. It is not a universal fix for every inaccessible Windows folder.
Avoid recursively changing ownership on locations such as:
- C:\Windows
- C:\Windows\System32
- C:\Program Files
- C:\Program Files (x86)
- C:\ProgramData
- C:\System Volume Information
- The entire C:\ drive
Many Windows files are deliberately owned by SYSTEM or TrustedInstaller. These ownership arrangements help prevent applications, malware and even administrators from accidentally altering critical operating-system components.
Changing them can cause:
- Windows Update failures
- Applications refusing to start
- Security features malfunctioning
- Incorrect permission inheritance
- Windows servicing or repair problems
- Increased exposure to malware
If a guide tells you to take ownership of an entire Windows directory to delete one file, stop and identify why that file is protected first.
Taking Ownership Will Not Recover EFS-Encrypted Files
A particularly important exception involves files encrypted with the Windows Encrypting File System, or EFS.
EFS encryption is tied to an encryption certificate and private key. Taking ownership or granting Full control does not provide the cryptographic key required to decrypt the file.
Microsoft states that an EFS-encrypted file remains accessible only to the user who encrypted it or to an authorised recovery agent, regardless of the ordinary file permissions. (Microsoft Learn)
Possible signs of EFS encryption include:
- A padlock or encryption indicator
- An Encrypt contents to secure data option in Advanced Attributes
- Error code 0x80071771 or 0x80071772
- Files that stopped opening after Windows was reinstalled
- Files that were accessible under an old Windows account but not a newly created one
To recover these files, you normally need the original EFS certificate and private key, often exported as a .pfx file, or access to the original Windows installation or an organisation’s configured recovery agent.
Do not repeatedly reset permissions on encrypted files. It does not remove the encryption and may make the original security configuration harder to diagnose.
OneDrive and SharePoint Files Need Different Checks
A file stored in OneDrive may appear inside File Explorer but still depend on cloud permissions, the correct Microsoft 365 account and the OneDrive sync client.
Before taking ownership of a OneDrive file:
- Confirm that OneDrive is running.
- Confirm that you are signed in with the correct account.
- Open OneDrive on the web and check whether the file can be accessed there.
- Check whether the file was shared with view-only rather than editing permission.
- Open the file’s Properties and ensure your account has Read and Write access.
Microsoft recommends checking the Security tab and confirming that Read and Write are allowed when OneDrive reports that it does not have permission to access a file. (Microsoft Support)
For SharePoint or business OneDrive libraries, local NTFS ownership is only part of the picture. The organisation’s Microsoft 365 permissions still determine whether the cloud service allows access.
What About Files from an Old Windows Installation?
An old drive or a Windows.old folder is one of the most common reasons for encountering ownership problems.
The safest approach is to take ownership only of the previous user’s data folders, such as:
- Desktop
- Documents
- Downloads
- Pictures
- Videos
- Project folders
- Locally stored email archives
- Application data that you specifically need to recover
Do not automatically take ownership of the previous Windows, Program Files or system folders.
After recovering the data, copy it into the equivalent folders under your current user profile. This allows the files to inherit the new profile’s normal permissions.
Access Denied on a Business Computer
On a managed company device, an access restriction may be intentional.
The file may be protected by:
- Microsoft Purview sensitivity labels
- SharePoint or Teams permissions
- Data loss prevention policies
- Endpoint security software
- A former employee’s account
- Departmental access groups
- Server permissions
- Ransomware protection
- An organisation’s retention or compliance policies
Changing ownership locally could bypass part of the intended control, create an audit issue or interfere with synchronisation.
Your IT provider should first establish why access was removed and whether it should be restored. The correct fix may be adding the user to the right Microsoft 365 or Active Directory group rather than forcing local ownership.
A Safer Troubleshooting Order
When Windows denies access to your files, follow this order:
- Restart Windows and close applications that may be using the file.
- Confirm that you are signed in with the correct account.
- Check whether the file is stored locally, on OneDrive or on a company server.
- Review the current owner and permissions.
- Check for encryption before changing anything.
- Take ownership of the smallest relevant folder.
- Grant Modify access rather than Full control where possible.
- Test one file before changing an entire directory.
- Back up recovered files to a separate location.
- Contact IT support if the folder contains company or system data.
Get Help Recovering Access Safely
Changing file ownership can recover important data, but applying the wrong settings to a large folder can create more problems than it solves.
Hamilton Group can investigate inaccessible files, recover data from old Windows installations, repair damaged permissions and identify whether encryption, OneDrive, SharePoint or company security policies are responsible.
Call 0330 043 0069 or book a meeting with one of our experts to get your files accessible again without weakening the security of your computer or business network.