ShareYourGroupShareYourGroupPC Fix

"Access is denied" and "You need permission to perform this action"

Windows blocks an action when your account lacks the right, the file is in use, or the file is protected for a good reason. Find out which before forcing it.

What you seeAccess is denied / You need permission to perform this action / You require permission from TrustedInstaller or SYSTEM / Folder Access Denied

First: should you be changing this file at all?

If the message names TrustedInstaller or SYSTEM, or the path is inside C:\Windows, Program Files or ProgramData, Windows is protecting its own files. Deleting or changing them by force is how working computers are broken. Leave them, and solve the real task another way: uninstall the program properly, or use Disk Cleanup for space (see low disk space).

The steps below are for your own files and folders: documents, photos, a folder from an old PC or an external drive.

1. Is the file in use?

"The action can't be completed because the file is open in..." names the program. Close it. If none is named:

2. Are you an administrator?

Settings › Accounts › Your info. Under your name it should say Administrator. If it says Standard user, sign in with an administrator account, or ask the PC's owner. On office and college computers, restrictions are set on purpose; ask the IT staff.

When a blue-and-yellow shield prompt asks "Do you want to allow this app to make changes?", choose Yes for programs you started yourself.

3. Run the program as administrator

To change a protected setting or save into a protected folder, right-click the program (Notepad, Terminal, an installer) › Run as administrator, then open or save the file from inside it.

4. Take ownership of your own folder

This is the usual fix for a folder copied from another PC or an old Windows installation, where the files belong to an account that no longer exists.

  1. Right-click the folder › Properties › Security tab › Advanced.
  2. Beside Owner, click Change.
  3. Type your account name (or your Microsoft account email), click Check Names, then OK.
  4. Tick Replace owner on subcontainers and objects, click Apply and OK.
  5. Back on the Security tab, click Edit, select your name (Add it if absent), tick Full control, OK.

The same from Terminal (Admin), with your own path in the quotes:

takeown /F "D:\Old Photos" /R /D Y
icacls "D:\Old Photos" /grant "%USERNAME%":F /T

5. Other causes

6. Deleting a stubborn file

Restart and try at once, before opening anything else. If it still refuses, start in Safe Mode and delete it there, where almost nothing else is running.

A caution about "fix permissions" tools and commands

Advice on the internet to run takeown or icacls on the whole of C:, or to change the owner of the Windows folder, causes damage that only a reset repairs. Use the commands above only on the single folder that is yours.

I am the administrator. Why am I still denied?

Being an administrator lets you take permission; it does not give it automatically on files owned by another account or by Windows. Use step 3 or 4.

What is TrustedInstaller?

A built-in Windows account that owns system files so that programs, and accidents, cannot change them. It is not a virus.

For Windows 11 and Windows 10. Written in November 2026. Menus move between updates; use the search box in Settings if a name differs. Back up important files before any step that resets, repairs a disk or opens the computer. This is an independent guide, not connected with Microsoft.