Blog

"Access Denied" When Opening a Folder? How to Take Ownership and Get Your Permissions Back (Windows 10/11)

Rough sketch of a yellow folder with a red no sign, an arrow, and an open blue padlock with a key and a green check

After connecting an old hard drive to a new PC or reinstalling Windows, opening an old folder sometimes shows "You don't currently have permission to access this folder" or "Access is denied". This happens because the folder's owner is still the account from the old PC. Changing the owner to your current account and granting permissions usually fixes it.

Before you start

  • Only do this for folders with your own data (for example, photo or recording folders on drive D). Never change the owner of C:\Windows, C:\Program Files or the whole C drive. It can break Windows.
  • You must be signed in with an administrator account.

1. With the mouse (Security tab)

  • Right-click the folder that will not open and open Properties → Security → Advanced.
  • Click Change next to Owner at the top, type your account name (or Microsoft account email), then click Check Names → OK.
  • Tick Replace owner on subcontainers and objects and click Apply. It can take a while if there are many files.
  • Close the window, go back to Properties → Security → Edit, select your account (click Add if it is missing), tick Full control and click OK.

2. All at once with commands

Right-click Command Prompt in the Start menu, choose Run as administrator, and enter the following, replacing the path in quotes with your folder.

  • Take ownership: takeown /f "D:\Old data" /r /d y
  • Give your account full control: icacls "D:\Old data" /grant %username%:F /t

If it still will not open

  • If the file names appear in green, they were encrypted with EFS on the old PC. Changing the owner does not help without that PC's certificate.
  • If the whole drive is locked with BitLocker, unlock it with the recovery key first.
  • If the disk itself has errors, it will not open regardless of permissions, so run a chkdsk scan as well.

Sources: Microsoft Learn – takeown, Microsoft Learn – icacls

Blog

← Back to the list Back to top ↑