ou can always count on Windows to throw massively annoying errors at you when trying to do the simplest of things. For example, deleting a folder! I tried to delete a folder on my Windows 7 machine and I ended up getting the following error message:
Cannot delete folder. You need permission to perform this action.
So the administrator of the computer needs permission to delete a folder created by the administrator? Thanks Windows. Obviously, my first thought was a permissions issue, but knowing how Windows works, you can never trust the error message either. Unfortunately, when dealing with the “You don’t have permission” issue, it’s either an actual permission issue or it’s because the file or folder is locked by a process.
In this post, I’ll walk you through the different methods you can try to fix this problem, starting with the easier less-likely-to-work solutions, followed by the most-definitely, but requires-more-work solutions.
- 1 Method 1 – Restart in Safe Mode
- 2 Method 2 – Change Permissions
- 3 Method 3 – Try Unlocker
- 4 Method 4 – MoveOnBoot
- 5 Method 5 – Use a Boot Disk
- 6 5 Fixes for the “You Need Permission to Perform This Action” Error
- 7 1. Check Your Windows User Account Type
- 8 2. Take Full Control of the File or Folder
- 9 3. Add Yourself to the Administrators Group
- 10 4. Boot into Safe Mode
- 11 5. Run SFC and CHKDSK
- 12 You Can Access Any Files!
Method 1 – Restart in Safe Mode
The easiest thing to try first is to restart Windows in Safe Mode and try to delete the folder from there. You can read my previous post on how to restart Windows 2000/XP/Vista/7 in safe mode. Windows 8 boots differently than previous versions of Windows, so read my previous post on how to boot Windows 8 into safe mode.
If you are able to delete the folder in safe mode, it means that some process was basically holding on to the folder and preventing Windows from deleting it. If you still can’t delete it and get the permissions error, keep reading below.
Method 2 – Change Permissions
Normally this error will be related to an actual permissions problem, so let’s at least get that out of the way before trying other options. Go ahead and right-click on the folder and choose Properties.
Next you want to click on the Security tab and then click on the Advanced button.
Now you want to click on the Change Permissions button at the bottom left.
Now is the fun part. It definitely looks complicated and that’s why you have to do this section right, otherwise you’ll think you set the permissions right when, in fact, they are wrong.
First of all, go ahead and check the Replace all child object permissions with inheritable permissions from this object box. Then go ahead and uncheck the Include inheritable permissions from this object’s parent box. When you uncheck the box, you’ll get a warning box where you’ll have to choose from Add or Remove. Go ahead and click on Add.
Now a normal folder that is deletable should look something like above with SYSTEM, Administrators and the user (Aseem) having Full Control with the Type set to Allow. At this point, you need to see what’s different and get your permissions to look like this using the Add, Edit and Remove buttons.
If you see any permissions with Deny in the Type, go ahead and remove them. Next make sure to add your username and the Administrators group and give them Full Control. Just click Add and type in the user name for your Windows account and then click Check Names. My Windows user name was Aseem, so I typed that in and clicked the button and it automatically changed it to WINDOWSMAC\Aseem.
Do the same thing for administrators, just type the word and click Check Names. If SYSTEM is not present, go ahead and add that also just to be on the safe side. When you are done and the permissions look correct, go ahead and click OK. It might take some time if the folder is large and has a lot of subfolders. Once it’s complete, go ahead and try to delete the folder!
Method 3 – Try Unlocker
Unlocker is a free program that does a great job of telling you which programs or processes are currently holding locks on the folder. Note that when you install it, you do need to make sure you don’t install any of the special offer software. The program is not malware or spyware, but it does ask you to install other programs, so you have to click on Skip a couple of times.
Once installed, it’ll add an option to your right-click context menu. Go to the folder in Explorer, right-click and choose Unlocker.
Now you will get a pop up window either stating there are currently no locks or you’ll get a list of processes/programs that have locks on the folder:
There may be many processes listed and so you have a couple of options at the bottom. You can either kill the process, unlock or unlock all.
Unlock will let you select one particular item and unlock it. If you want to release all locks on the folder, just click Unlock All. It’s a very effective tool and usually will solve your problem. If none of the above mentioned methods worked, your last choice is below.
Method 4 – MoveOnBoot
If nothing else has worked, then you can try a few other things. One is to try and delete the file before Windows boots up completely. In order to do this, you can use a program called MoveOnBoot. It’s freeware and work differently than a program like Unlocker.
You basically install it, tell it which files or folders you want to delete that you aren’t able to delete and then let it restart the computer. It will let you know in program whether it’ll be able to delete the folder or not.
Method 5 – Use a Boot Disk
This program still runs in Windows and there are occasions when it may not work. In that regard, the only surefire way to delete a folder regardless of permissions or whether it’s locked or not is to use a boot disk. This is definitely more complicated, but using this method, you can delete anything you want.
Basically, a boot disk is a bootable CD/DVD that loads an OS or DOS interface that lets you then run commands like deleting partitions, deleting files, repairing master boot records and lots more. Most of the boot disks are overkill for what we want to do, but it’ll get the job done if nothing else is working.
I’m not going to go into detail about how to use a boot disk here because most of those sites all have their own documentation, but it’s not too hard if you spend a little time. Here are a list of free bootdisk images you can download:
If you are having trouble with one of the methods above, feel free to a post a comment and we’ll try to help out. Method 5 can be a little complicated, so if you have any questions, feel free to ask. Enjoy!
5 Fixes for the “You Need Permission to Perform This Action” Error
Windows requires permissions for the actions you perform on your computer. But it’s your computer, right? So why do you need permission to access certain files and folders? There are a couple of answers that link together.
Windows wants to protect you from accessing certain files because editing those files could damage the operating system. Thus, if your Windows user account doesn’t have the correct privileges, you cannot access certain files or folders.
When that happens, you’ll encounter the “You need permission to perform this action” error message.
It is frustrating, for sure. But here are five fixes for the error.
1. Check Your Windows User Account Type
One of the most common fixes for “You need permission to perform this action” error is to check your Windows user account type. There are three main types of Windows user account: Administrator, Standard, and Guest.
Your Windows user account type defines the range of activities you can access on the Windows machine:
- Administrator: An Administrator account controls the entire computer, including the other Windows user accounts.
- Standard: A Standard account can use the computer and has access to programs, media, and so on, but typically cannot install new programs or remove existing programs. The standard account comes with other restrictions (or privileges), depending on the decisions of the administrator.
- Guest: Guest accounts are used primarily for outsiders who require very infrequent access to the computer. A Guest account will have the fewest access privileges.
If you are using a Standard or a Guest account, you will need permission for certain files and folders carrying access restrictions. In some cases, the permissions restriction error screen will include the option to input the Administrator user account password. If you know the admin, you may ask them to input their password to remove the restriction, thus fixing the error.
However, this is a temporary fix that does not grant continual access to the entire computer.
How to Check Your Windows User Account Type
To check the type of Windows user account you are using, head to Control Panel > User Accounts. The user account type will display along with your username.
2. Take Full Control of the File or Folder
A Windows Administrator user account can take control of the file or folder from another user group on the system. Sometimes file permissions bug out, or another user changes the file access permissions, denying your Windows user account access.
Right-click the file or folder you want to take full control of and select Properties. Select the Security tab, followed by the Advanced option.
When the Advanced Security Settings window opens, select Change to open the Select User or Group options. Now, select Find Now to unfurl a list of users on your system. Browse to your Windows user account name, then OK.
Back on the Advanced Security Settings window, check the box to Replace owner on subcontainers and objects, then select Apply.
After taking full control of the file or folder, you will not see the permission error any longer.
3. Add Yourself to the Administrators Group
In certain circumstances, you can add yourself to the Administrators Group on the system. However, this will not work if you are using a Standard Windows user account that is restricted from an Administrator user account.
Follow these steps to add your name as a member to the Administrator account:
- Press Windows Key + X then select Computer Management.
- Head to Local Users and Groups > Users, where you’ll see a list of user accounts.
- Right-click your username and select Properties, then open the Member Of tab.
- Press Add, then in the Enter the object names to select box, input “Administrators.”
- Select Check Names, then OK.
You’ll need to restart your PC before the changes take place.
4. Boot into Safe Mode
Sometimes a Windows issue may stop you accessing a specific file or folder. To see if it is a bug, you can boot into safe mode, then attempt to access the restricted file.
There are several ways to enter Windows safe mode. The easiest is to press Windows Key + R, input msconfig, and press Enter.
Open the Boot tab. Under Boot options, select Safe boot.
Now, press Apply and restart your system.
Once your system boots, attempt to access the restricted file.
Before rebooting back into Windows again, open msconfig and uncheck the Safe boot option, then press Apply. If you don’t uncheck the option, Windows will boot straight back into safe mode again.
5. Run SFC and CHKDSK
Another method for fixing the “You need permission to perform this action” error is to check for a corrupt file. Windows System File Check (SFC) is an integrated Windows system tool you can use to check for errors.
Before running the SFC command, you need to check it is working properly. To do this, we use the Deployment Image Servicing and Management tool, or DISM.
Like SFC, DISM is an integrated Windows utility with a wide range of functions. In this case, the DISM Restorehealth command ensures that our next fix will work properly.
Here’s how you use DISM and SFC:
- Type Command Prompt (Admin) in the Start menu search bar, then right-click and select Run as administrator to open an elevated Command Prompt.
- Type the following command and press Enter: DISM /online /cleanup-image /restorehealth
- Wait for the command to complete. The process can take up to 20 minutes, depending on your system’s health. The process seems stuck at certain times, but wait for it to complete.
- When the process completes, type sfc /scannow and press Enter.
CHKDSK is another Windows system tool that checks your file structure. Unlike SFC, CHKDSK scans your entire drive for errors, whereas SFC scans your Windows system files specifically. Like SFC, run the CHKDSK scan from the Command Prompt to fix your machine.
- Type command prompt in your Start menu search bar, then right-click the best match and select Run as administrator. (Alternatively, press Windows key + X, then select Command Prompt (Admin)from the menu.)
- Next, type chkdsk /r and press Enter. The command will scan your system for errors and fix any issues along the way.
After SFC and CHKDSK complete, fixing any corrupt files along the way, restart your system. Then, attempt to access the restricted files.
You Can Access Any Files!
Now you have seen the fixes, you can access any file on your computer. The “You need permission to perform this action” error message is a frustration.
Furthermore, most of the fixes revolve around Administrator accounts. Such is the way that Windows works, an Administrator account is a golden key. If you don’t have an Administrator account, you should contact your system admin for help—or at least, their password.
But what do you do if you are an administrator and lose your Windows Administrator password? There are two fixes available that can help you get back into your account.