Access denied to files and folders: How to fix

1521

Do you get an Access denied error when trying to open a file or folder? In Windows, it is the owner of an object who controls how permissions are set and granted.

If the files or folder owner is a different user account, Windows will display the Access Denied message or otherwise refer to insufficient privileges.

If the files to open come from another computer or an old backup created with a different user or on another system, Windows will display the error access denied to the file or folder.

It is good to point out immediately that an administrator is entitled to become the owner of any file or folder on the computer. The Access denied error can, therefore, be solved quite simply.

How to resolve the Access denied error to a file or folder

First of all, our advice is to log in to Windows using an account belonging to the administrators group, therefore with the highest user privileges.

At this point, you can right-click on the folder containing the inaccessible files and choose Properties.

Access denied to files and folders: how to fix - Image 1

From the Security tab, you will have to click on the Advanced button.

By clicking on the Owner tab, you can check which user accounts own the folder and the items it contains.

Access denied to files and folders: how to fix - Image 2

By clicking on Edit then on Other users or groups, you can set a user or a group of users as new owners by specifying the corresponding name.

Access denied to files and folders: how to fix - Image 3

To change the owner of all sub-containers and objects, simply check the Replace owner in the sub-containers and objects box.

By accessing the Permissions tab, you will need to assign Full Control to the new owner user account.
Access denied to files and folders: how to fix - Image 4

To customize permissions and choose Full Control, just click Change Permissions, select the owner account you just specified and click the Edit button.

By checking the Replace all child object permissions with inheritable permissions derived from this object box, the same permissions will be applied to the selected folder’s contents.

Alternatively, to quickly assign ownership of a folder and all the items it contains to the Administrators user group, you can open the command prompt with administrator rights and type the following:

takeown / FC: \ FOLDER_NAME \ * / R / A
cacls C: \ FOLDER_NAME \ *. * / T / grant administrators: F

By doing this, the access denied error should disappear, and the files in the FOLDER_NAME folder can be opened, edited, and deleted without problems.