Aller au contenu
tricknfixGAMING · TECHNOLOGIE · INFORMATIQUE
Créer
Share
Share this topic

PC CONFORT · ENGLISH VERSION

Access denied to a folder on Windows 11: causes and solutions

English translation of the original French post. Code, commands, paths and error codes keep their original meaning. Replies and moderation are shared in the original discussion.

Is Windows 11 denying you access to a data folder: an old drive connected to a new PC, the folder of a former user account, an external drive formatted as NTFS on another computer or a folder restored from a backup? This guide explains why File Explorer blocks access, what the Continue button really does, and how to regain control of your own files by taking ownership of the folder, with a backup of the permissions so you can roll back. The steps also apply to Windows 10.

Never change the permissions of Windows folders (C:\Windows and its subfolders, for example) or of program installation folders. Microsoft explicitly advises against it: it can stop programs or Windows from working.

Problem

  • File Explorer shows a message saying you don't have permission to access the folder, with a Continue button.
  • After Continue, access is still denied, or Windows suggests using the Security tab.
  • The folder comes from another PC, a former account or an old Windows installation.
  • Some files stay unreadable even when the folder opens.

Message shown by File Explorer:

Plain text4 lines

You don't currently have permission to access this folder.
Click Continue to permanently get access to this folder.

Observe before acting

ObservationMost likely causeStep
Message with a Continue button on a data folderYour account lacks read permission, but an administrator can grant itStep 1
Continue is not enough, access remains deniedThe owner is an account from another PC or a deleted former accountSteps 2 to 4
The folder opens, but some files show "Access denied"Files encrypted by another user (EFS)Special cases
Access denied to a shared folder on the networkShare permissions, not the local diskShared folder unreachable on the network (0x80070035) (French guide)
A program cannot save to Documents, Pictures or Desktop and Windows Security shows a notification"Controlled folder access" protectionControlled folder access blocking your files (French guide)

Step 1: understand and use the Continue button

When to use it: the message with Continue appears on a data folder that belongs to you (photos, documents, backups), and your account is an administrator of the PC.

According to Microsoft, when you click Continue, User Account Control (UAC) asks for administrator rights, then a background process permanently changes the permissions of the folder, all its subfolders and files, to give your account Full Control. It is not temporary access.

Suggested solution

  1. Check that this really is a data folder and not a Windows or program folder.
  2. Click Continue, then accept the User Account Control prompt (or enter the password of an administrator account).
  3. Wait: on a large folder, applying the permissions can take some time.

Expected result: the folder opens and the message no longer appears. If access is still denied, go to step 2.

Good to know: for a folder reserved for administrators, Microsoft recommends using a tool started as administrator instead (Command Prompt, PowerShell) to avoid this permanent change of permissions.

Step 2: back up the current permissions

When to use it: before changing the owner or the permissions (steps 3 and 4). This backup lets you roll back.

The icacls command can save the access control lists (DACLs) of a folder and all its contents to a file, then reapply them later. In the following examples, the folder concerned is D:\Ancien: adjust this path to your case.

Suggested solution

  1. Open Command Prompt as administrator: type "cmd" in Search, then Run as administrator.
  2. Save the permissions of the folder's contents to a file on your Desktop:
Batch3 lines

icacls D:\Ancien\* /save "%USERPROFILE%\Desktop\acl_ancien.txt" /t /c
  1. Check that the acl_ancien.txt file has appeared on the Desktop. Error messages for a few inaccessible files are possible: the /c parameter lets the command continue despite them.

Expected result: a permissions backup file exists. Keep it until everything works.

Step 3: take ownership of the folder

When to use it: the owner of the folder is an account that no longer exists or that comes from another PC.

The owner of a folder decides its permissions. Microsoft states that an administrator can take ownership of any file on the PC.

Suggested solution

With File Explorer

  1. Right-click the folder, then Properties and the Security tab.
  2. Click Advanced.
  3. At the top of the window, next to Owner, click Change.
  4. Type the name of your user account, click Check Names, then OK.
  5. Tick Replace owner on subcontainers and objects, then Apply and accept the elevation prompt.
  6. Close all the properties windows, then reopen them to see the changes.

Or with Command Prompt (as administrator)

Batch3 lines

takeown /f D:\Ancien /r /d Y

The /r parameter processes all subfolders and files. According to Microsoft, /d Y also takes ownership of subfolders you could not list, and then replaces their permissions with Full Control for your account only: this is why the backup from step 2 is useful.

Expected result: under Security > Advanced, your account appears as Owner. Microsoft points out that after a change of owner, you may still need to grant yourself permissions: that is step 4.

Step 4: grant yourself access to the folder

When to use it: you are the owner, but access is still denied.

Suggested solution

With File Explorer

  1. Right-click the folder, Properties, Security tab, then Edit.
  2. Click Add, type the name of your account, Check Names, then OK.
  3. Select your account and tick Full control (or Modify) in the Allow column, then Apply.

Or with Command Prompt (as administrator)

Batch3 lines

icacls D:\Ancien /grant "%USERNAME%":(OI)(CI)F /t /c

This command adds Full Control (F) for your account on the folder, inherited by files (OI) and subfolders (CI), without removing existing permissions.

Expected result: the folder and its files open normally.

Rollback: to reapply the permissions saved in step 2, as administrator:

Batch3 lines

icacls D:\Ancien\ /restore "%USERPROFILE%\Desktop\acl_ancien.txt" /c

This command restores the saved permission lists (DACLs); it does not restore the previous owner.

Special cases

SituationWhat to do
Files encrypted by another user (EFS)Microsoft states that these files remain accessible only to the person who encrypted them (or to the designated recovery agent), regardless of the other permissions. To check, add the Attributes column in Details view: an E indicates an encrypted file. Taking ownership is not enough: you need the former account's certificate.
Windows or program folder (C:\Windows, Program Files…)Do not change its owner or permissions. If a program no longer works, reinstall it instead.
Work or school PCPermissions may be enforced by your organisation: contact your IT department.
The path contains spacesPut it in quotation marks in the takeown and icacls commands of steps 3 and 4.

Final check

  • ☐ Your account appears as owner under Security > Advanced (if you followed step 3).
  • ☐ The folder and its files open without an access denied message.
  • ☐ No Windows or program folder has been changed.
  • ☐ The permissions backup file is kept until everything has been checked.

Sources

Still having the problem?

Reply in this topic with your Windows version (Windows + R keys, then winver), where the folder comes from (another PC, former account, external drive, backup), the type of account you use (administrator or standard), the exact message shown and the output of the commands you have already tried. Replace your user name with "USER" if you paste command output.

Continue the discussion

The replies are available in the original French thread. They have not been translated.

Read the discussion