There are instances wherein you need to get complete access to a file or folder in Windows 10. It can either be a system file or folder, or one which created in an account that no longer exists. In most cases, the Windows operating system will prevent you from performing any operation on such files or folders.
Here are the instructions on how you can gain permission to delete any file or folder in Windows:
STEP 1: Open File Explorer, then locate the file or folder you want to gain permission to.
STEP 2: Right-click on that file or folder, then select Properties.
STEP 3: Go to the Security tab.
STEP 4: On the Security tab, click the Advanced button.
STEP 5: When the Advanced Security Settings for the file/folder opens, click on the Change link beside the Owner label.
STEP 6: On the Select User or Group window opens, select the user account via the Advanced button, or just type your user account in the area which says Enter the object name to select.
STEP 7: Click OK.
NOTE: Alternatively, to change the owner of all subfolders and files inside the folder, check the box next to Replace owner on subcontainers and objects.
STEP 8: Click OK to change the ownership.
STEP 9: To provide full access to the file or folder for your account, right-click the same file or folder again, then click Properties.
STEP 10: Go back to the Security tab.
STEP 11: Click the Add button.
STEP 12: On the Permission Entry window, click the Select a principal link next to the Principal label, then select your account, and then click OK.
STEP 13: Set permissions to Full control, then click OK.
NOTE: Alternatively, you can check the box next to Replace all child object permission with inheritable permission entries from this object in the Advanced Security Settings window.
This means permissions on this parent object will replace those on its descendant objects. When cleared, permissions on each object, whether parent or its descendant, can be unique.
STEP 14: Click OK to get full access to the file or folder.