Modifying folder properties, removing the ‘Read-only’ flag, or toggling ‘Hidden’ attributes on an external hard drive, shared network folder, or system directory in Windows 11 can abruptly trigger an error dialogue stating: ‘An error occurred while applying attributes to the file: [File Path]. Access is denied’ (or ‘The system cannot find the file specified’). Windows presents options to Ignore, Ignore All, Retry, or Cancel. Clicking Ignore simply repeats the error across dozens of nested files. Here is how to take full ownership and resolve attribute modification blocks in Windows 11.
Why Does Windows 11 Block Attribute Changes?
In the Windows NTFS file system, file attributes (such as Read-only, Hidden, Archive, and System) are governed by Access Control Lists (ACLs). The error occurs due to:
- Lack of NTFS Write Permissions: Your active user account does not possess ‘Full Control’ or ‘Write Attributes’ permissions on the target directory.
- Ownership Restrictions: Files migrated from an older Windows installation or another PC are owned by an unresolved Security Identifier (SID) or
TrustedInstaller. - Files Actively Locked by Processes: Background programmes (such as cloud syncing services, media players, or antivirus scanners) holding active open handles on files inside the folder.
- Corrupted File System Records: Bad sectors or index errors preventing Windows from committing metadata changes to the disk.
- Read-Only Storage Media: An external SD card or USB flash drive with a physical write-protect lock engaged, or mounted in read-only safety mode.
Step 1: Take Ownership of the Folder and Enforce Inheritance
Assigning your user account as the absolute owner of the parent folder overrides legacy security blocks.
- Right-click the problematic folder and select Properties.
- Navigate to the Security tab and click the Advanced button at the bottom.
- At the top of the Advanced Security Settings window, locate Owner: and click Change.
- In the object name box, type:
(Or type your Windows account username) and click Check Names. Click OK.Administrators - Check the box labelled ‘Replace owner on subcontainers and objects’.
- At the bottom of the window, check ‘Replace all child object permission entries with inheritable permission entries from this object’.
- Click Apply and confirm the Windows Security prompt, then click OK.
Step 2: Grant ‘Full Control’ Permissions to Your User Account
Once ownership is established, explicitly grant unrestricted read and write permissions.
- In folder Properties > Security, click the Edit… button.
- Select Administrators (or your username) from the list.
- Under the Permissions section, check the box for Full control under the Allow column.
- Click Apply and then OK.
- Now, return to the General tab, adjust your Read-only or Hidden attributes, and click Apply. The attributes will apply across all subfolders without error.
Step 3: Force Attribute Changes via Command Prompt (attrib)
If the File Explorer graphical interface continues to encounter locks, executing the native attrib utility in an elevated Command Prompt bypasses UI timeouts.
- Press Windows Key + S, type
cmd, right-click Command Prompt, and select Run as administrator. - To strip the Read-only and System attributes recursively from all files and folders inside a directory:
attrib -r -s "D:\Path\To\Folder\*.*" /s /d - To remove the Hidden attribute recursively:
attrib -h "D:\Path\To\Folder\*.*" /s /d - The
/sflag processes matching files in the current folder and all subfolders; the/dflag processes folders as well.
Step 4: Close Locking Applications Using Resource Monitor
If an individual file inside the folder returns ‘The process cannot access the file because it is being used by another process’:
- Press Windows Key + R, type
resmon, and press Enter to open Resource Monitor. - Click the CPU tab.
- Under the Associated Handles search bar, paste the name of the locked file.
- Identify the process holding the lock, right-click it, and select End Process.
- Retry modifying folder attributes.