The way Windows works is that if a folder, program or file is being used by another process, then the user will not be able to make any changes to it. If you are getting the error “You need permission to perform this action” while trying to delete or move the file/folder, then it is most likely caused by a permissions issue or that file/folder is being used by another program. For example, The folder or file within the folder is being backed up or is being scanned by your AntiVirus program. If the permissions are changed, then you will still be presented with this error – even if you are the administrator. In this guide, I will walk you through a couple of methods to address this issue.
Method 1: Restart Your Computer in Safe Mode
Safe Mode loads windows with those programs and services that are Windows-related and loads with minimal settings. If the reason for the “permission issue” is due to the file being used by another process, then you will be to delete it via Safe Mode. To reboot your system in safe mode, do the following:
- To reboot a Windows 8/8.1/10 system in Safe Mode click (here).
- To reboot a Windows 7 / Vista in Safe Mode Restart your computer and repeatedly tap F8 until you see the Advanced Boot Menu. If you do not see this menu, start over again and repeatedly tap the F8 key on your keyboard until you see this. When you see this select Safe Mode with Networking. You will be able to login to safe mode fine.
- On the Advanced Boot Menu, select Safe Mode with Networking using the arrow keys on your keyboard. Hit Enter to start the computer in Safe Mode with Networking.
Method 2: Check Permissions
To check and modify the permissions, follow the steps below.
- Right-click the file or folder and click Properties.
- Navigate to the Security tab and click Advanced.
- Make sure that your user account has “Full control” of the folder and subfolders. If you see that your username doesn’t have the full control, click Change or Change Permissions after selecting your username.
- Check the checkbox labeled “Replace all child object permissions with inheritable permissions from this object”.
Note: If you are using Windows 7, uncheck the checkbox labeled “Include inheritable permissions from this object’s parent”.
If you are using Windows 8 or later, you will see a button for the same purpose. Click this button.
- Click Add. In Windows 7, type your user name in the Enter the object name to select. In windows 8 and later, click Select a principal and type your username in the Enter the object name to select. Click OK.
- Click Full Control in the resulting dialog box and click OK. Now, you have full access to the file or folder while you have successfully removed all the permission for other users including the system. If this error was due to the permissions, you should be able to delete this file or folder now.
Method 3: Use Unlocker
You can also use Unlocker by Empty Loop. Once downloaded, run the program and while installing the program, choose Advanced option and make sure to uncheck third-party software that comes bundled with Unlocker. When the installation completes, close the installer.
Right-click the folder you want to delete. You will see a new option called Unlocker. Click this option. It will open an Unlocker window. It will show you whether the file or folder is locked by a process. If it is, Unlocker will show you the list of all such processes. Choose Unlock All or any other option as needed.
Unlocking will allow you to delete the file or folder easily.
Method 4: Create a .bat file that takes ownership of the folder
If Windows won’t recognize your permissions for the file, you can create a .bat file that will take full ownership of the folder, and run that as administrator.
- Right-click on your desktop, and create a new text file, named anything.bat.
- Open the file with a text editor, and add the following lines inside:
- Replace C:\Locked Directory with the name Path the Folder having permission issues.
SET DIRECTORY_NAME="C:\Locked Directory" TAKEOWN /f %DIRECTORY_NAME% /r /d y ICACLS %DIRECTORY_NAME% /grant administrators:F /t PAUSE
Method 5: Adding Permissions to Drive
Another thing that we can do to counter this issue is to change the permissions for the whole drive. In order to do that, follow the steps below.
- Open your “File Explorer” or “My Computer” or “This Pc” feature depending upon the version of Windows.
- Right-click on the partition in which the file is located and select “Properties”.
- In properties, select the “Security” tab and click on the “Edit” button.
- Select the “Add” option and click on “Advanced”.
- Select “Find Now”, scroll down and double click on “Everyone”.
- Click on “OK” and tick the “Full Control” and “Modify” permissions for “Everyone” in the next window.
- Click on “Apply” and select “OK”.
- Check to see if the issue persists.
Method 6: Using Registry Method
Someone on the internet designed a registry key that allows you to take ownership of the file in a very convenient method. All you have to do is install it on your computer and then right-click on the file that needs to be taken ownership of and select “Take Ownership”. In order to do all this:
- Click here to download the registry key.
- After downloading, extract the file on a convenient location on your desktop and then run it.
- It will automatically be added to your registry key.
- Now, right-click on anything that you wish to take ownership of and select “Take Ownership”.
- Check to see if the issue persists.