How to Fix Access is Denied, File May Be In Use, or Sharing Violation Errors in Windows
You might have deleted a file and got Access is Denied error? Or you might have tried to move or copy a file or folder but got an error message that the source file is in use? This error can occur due to several reasons that you don’t have the e ownership of the file or folder or you cannot perform this action because the program or the operating system is currently using it.
You can easily find out the reason behind it by looking carefully at what you are doing. If you are getting Access is Denied or currently you don’t have the permission to access this folder message, then it can be that you are not the Administrator on the computer so to fix the issue you first need to have the admin account.
Access Is Denied Error
This error is generally due to the NTFS permissions, but the issue can even occur when the user profile is corrupt.
Thus to gain access to the file or folder, you must have the permissions for your account. Before starting anything first try to click on the Continue button which will automatically show up in Windows 7 or Windows 8. It will give you the user account permissions to the folder as long as you are the admin.
If you get You have been denied permission to access this folder message after hitting on Continue button then it is clear that you are not the owner of the folder.
Take Ownership of Files and Folders in Windows
Having the ownership is quite a lengthy process it need ample of time and patience. To start you need to click on file or folder now select Properties and move to Security tab.
If you find no aces to the folder and find a message stating that you need to be an Administrator to view this object’s security properties. Move ahead and hit on Continue. You will another dialog box where you will get the choice to change the owner.
In Change owner to: box, choose the user account or Administrators. After selecting your account make sure to check Replace owner on subcontainers and objects box. Hit OK and you will find another message saying that you don’t have the permission to read the content do you want to replace the permissions and want Full Control. Hit Yes.
Now just click OK on other open windows to close all the dialogs. At this point don’t change any other settings. First of all just close all the open dialogs and move to Explorer screen. Now again right-click on the file/folder and select Properties and move to Security Tab.
At this point you can access the contents of the file/folder but it is good to reset the permission. And if you want default Windows permissions to be appl.ied then follow the next steps. Hit on Advanced button after this click on Change Permissions.
Now hit on Remove button and remove all the permissions which are recently listed. At this point it should be your user account. Once the listbox is empty check the Include inheritable permissions from this object’s parent box. After this click on Apply button, not on OK button.
You will find various entries in listbox, including your user account. The default permissions contain the SYSTEM and Administrators generally so it’s a good idea to reset it properly. If the folder contains many sub-folders with files, check the Replace all child object permissions with inheritable permissions from this object box. Now close all the dialogs!
As it is told earlier that Access is Denied are also caused by some issues. Corrupt user profile can also be the reason so you need to create a new user profile and try to aces the file or folder.
The other issue is the encrypted file. Check to find whether other files are encrypted or not by right-clicking and selecting the Properties. After that hit on Advanced button from General tab and uncheck Encrypt contents to secure data box.
But if someone else has encrypted the file/folder they you won’t be able to access it until it is decrypted by using their account. But if the file is corrupt you need to find software in order to repair the corrupt files.
File in Use or Sharing Violation Error
Getting Access is Denied message can even be caused by sharing violation, and if the above method fail then try the below procedure.
You can download or install a free program known as Process Explorer from Microsoft. You can use it to search which processes are locking up the file. Now right click on the executable file after unzipping and select Run as Administrator to run the program.
Don’t worry about the crazy colors and bars move to the top and hit on Find and then Find Handle or DLL.
Now type the file name in question in box and type search. You need not to type the full name of the file just type the part of it.
Now get back a list of processes which currently locks on file. In many case the Notepad.exe is locked by test document. Now select the item in the box and close the search box. Now get back to the main process explorer screen. At the bottom you will find a row highlighted it will be the path to the file which you have selected in the search box.
Simply right click on that row and select Close Handle. You need to repeat the same procedure for each process if there is more than one process in search box,
At this point you can delete or modify the file. It is a very useful program when you get the following error message:
- Unable to delete the file: Error 5 Access is denied
- Sharing Violation
- Source or destination file is in use
- file is in use by other program or user
- Ensure that the disk is not full or write-protected and the file is not in use.
But in some case the program doesn’t work at that time you can use PC repair Tool that is capable of resolve any sort of PC issues.