Windows "You need permission to perform this action": fix it
Windows shows "You need permission to perform this action" when your account lacks the NTFS rights to delete, rename, move or change a file or folder. The usual fix is to take ownership: right-click the item, choose Properties > Security > Advanced, click Change next to Owner, enter your username, then give your account Full control. You need an administrator account to do this.
What this message means
Every file and folder on an NTFS drive has an owner and a list of permissions saying who may read, change or delete it. This dialog (usually titled "Folder Access Denied" or "File Access Denied") appears when the action you tried is not allowed for your account, even if you are an administrator. The line underneath tells you who controls the item, for example "You require permission from TrustedInstaller", "from SYSTEM", "from the Administrators" or from an unknown account shown as S-1-5-21-... That name is the most useful clue: it tells you whether the item belongs to Windows itself, to another user, or to an account that no longer exists.
Common causes
| Cause | How to tell |
|---|---|
| The file or folder is owned by another account or by an old Windows installation | The dialog says "You require permission from S-1-5-21-..." or from another user's name. Typical on a second drive or external disk moved from another PC, or leftover folders like Windows.old. In Properties > Security > Advanced the Owner shows "Account Unknown" or another user. |
| You are signed in with a Standard or Guest account | Settings > Accounts > Your info shows "Standard user" under your name instead of "Administrator". You are never offered an administrator password prompt, or the Change link next to Owner is refused. |
| The item is a protected Windows system file | The dialog says "You require permission from TrustedInstaller" or "from SYSTEM", and the path is inside C:\Windows, C:\Program Files or C:\ProgramData. |
| The file is open or locked by a program, antivirus or sync app | The error appears for a file you normally can change, often right after using it. It disappears after closing the program, pausing OneDrive or restarting the PC. |
| Share permissions on a network or shared folder only allow Read | The path starts with \\ or a mapped drive letter. You can open files but cannot save, rename or delete them, while the owner of the share can. |
| Controlled folder access (ransomware protection) is blocking an app | A Windows Security notification says "Unauthorized changes blocked" or "App is blocked" when an app tries to save into Documents, Pictures, Desktop or another protected folder. |
How to fix it
1. Close whatever is using the file and try again
- Close any program that has the file open, including preview panes in File Explorer (View > Show > Preview pane on Windows 11, View > Preview pane on Windows 10).
- If the folder is in OneDrive, click the OneDrive cloud icon in the taskbar, open Settings (gear icon) and choose Pause syncing.
- Restart the PC, then try the delete, rename or move again before opening anything else.
2. Confirm you are using an administrator account
Windows 11: Settings > Accounts > Other users. Windows 10: Settings > Accounts > Family & other users.
- Open Settings > Accounts > Your info and check whether it says Administrator under your name.
- If it says Standard user, sign in with an administrator account, or ask the administrator to change your type.
- To change it (from an admin account): go to Settings > Accounts > Other users, select the account, click Change account type, choose Administrator, then OK.
- Sign out and back in so the change takes effect.
3. Take ownership and grant yourself Full control in File Explorer
Windows 10 and Windows 11. Not recommended for files inside C:\Windows or Program Files.
- Right-click the file or folder and choose Properties, then open the Security tab and click Advanced.
- Next to Owner, click Change. Type your Windows username (or your Microsoft account email), click Check Names, then OK.
- For a folder, tick "Replace owner on subcontainers and objects", then click Apply and OK. Close and reopen Properties.
- On the Security tab click Edit, select your account (click Add and enter it if it is not listed), tick Allow next to Full control, then Apply and OK.
- For a folder, go back to Security > Advanced, tick "Replace all child object permission entries with inheritable permission entries from this object", then Apply.
4. Take ownership from an elevated Command Prompt
Windows 10 and Windows 11. Use Command Prompt, not PowerShell, because %username% only expands in Command Prompt.
- Click Start, type cmd, right-click Command Prompt and choose Run as administrator.
- Take ownership of the folder and everything in it: takeown /f "D:\Path\To\Folder" /r /d y (for a single file drop /r /d y). On a non-English Windows, replace y with that language's word for Yes, for example j in German.
- Grant yourself Full control: icacls "D:\Path\To\Folder" /grant "%username%":(OI)(CI)F /t /c
- If the permissions are a mess and you only want Windows defaults back, run icacls "D:\Path\To\Folder" /reset /t /c instead.
- Try the action again in File Explorer.
5. Fix share permissions on a shared folder
Run on the PC that hosts the shared folder, with an administrator account.
- On the host PC, right-click the shared folder and choose Properties, then the Sharing tab.
- Click Advanced Sharing, then Permissions.
- Select the user or group (for example Everyone) and tick Allow for Change (or Full Control), then OK.
- Also check the Security tab: the effective access is the more restrictive of Sharing and Security, so the user needs Modify there too.
- Disconnect and reconnect the network drive on the other PC, then try again.
6. Allow the app through Controlled folder access
Only if a Windows Security "Unauthorized changes blocked" or "App is blocked" notification appeared.
- Open Windows Security (search for it in Start).
- Go to Virus & threat protection > Manage ransomware protection.
- Click Allow an app through Controlled folder access, confirm the prompt, then click Add an allowed app.
- Choose Recently blocked apps or Browse all apps and select the program that was blocked.
- Save the file again from that app.
Next time, skip the search
Crade is an AI assistant for Mac and Windows that sees your screen. When a message like this pops up, ask “what does this mean?” and it explains the exact error in front of you, step by step.
Download CradeStill not fixed?
Restart in Safe Mode (Settings > System > Recovery > Advanced startup > Restart now, then Troubleshoot > Advanced options > Startup Settings > Restart, press 4) and try again, since that stops most third-party programs that lock files. If the drive itself may be damaged, run chkdsk C: /f from an elevated Command Prompt (replace C: with the right drive letter), and run sfc /scannow if system files seem affected. On a work or school PC, permissions are usually set by your IT department through Group Policy, so contact them rather than changing ownership yourself. If the error is for a file inside C:\Windows, leave it alone. Windows protects it deliberately, and changing it can break updates.
Questions people ask
Why do I get this error when I am already an administrator?
Being an administrator does not automatically give you rights to every file. Items owned by TrustedInstaller, SYSTEM, another user or an old Windows installation still block you until you take ownership or are granted permission.
What does "You require permission from S-1-5-21-..." mean?
The owner is an account that no longer exists on this PC, usually from a previous Windows install or another computer the drive came from. Take ownership with your current account to fix it.
Is it safe to take ownership from TrustedInstaller?
For files inside C:\Windows or Program Files, no. It can stop Windows Update and system repair from working. It is fine for leftover folders on data drives or folders you created yourself.
How do I delete a folder that says I need permission?
Take ownership of the folder with the Replace owner on subcontainers and objects option, grant yourself Full control, then delete it. For a leftover Windows.old folder, use Settings > System > Storage > Temporary files instead.
Can I do this on Windows 11 Home?
Yes. The Security tab, takeown and icacls all work on Home. Only the Local Users and Groups console is missing, so change account types through Settings > Accounts instead.
Sources
- takeown (Microsoft Learn)
- icacls (Microsoft Learn)
- Allow an app to access controlled folders (Microsoft Support)
- Windows "Activate Windows" watermark: what it means and how to fix it
- Windows activation error 0xC004F074: what it means and how to fix it
- Application was unable to start correctly (0xc000007b): fix
- Windows "No Audio Output Device is installed": causes and fixes
- Windows Automatic Repair couldn't repair your PC: fixes
- Windows "Make sure your Bluetooth device is still discoverable" fix