You don t have permission to perform that action
You don t have permission to perform that action
Fix: You need permission to perform this action
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:
Method 2: Check Permissions
To check and modify the permissions, follow the steps below.
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 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.
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:
You do not have permission to perform that action
I have a time-triggered script that periodically retrieves content from an external source and updates a Google sites page with it. According to this, the script should be running under my account, which has full assess to that Google site page (tested by manually editing it). But when I run the script, I get the
You do not have permission to perform that action.
Why do I not have that permission when running the script, if I can edit the page manually?
Here is the (generalized) script function:
2 Answers 2
Trending sort
Trending sort is based off of the default sorting method — by highest score — but it boosts votes that have happened recently, helping to surface more up-to-date answers.
It falls back to sorting by highest score if no posts are trending.
Switch to Trending sort
In the script editor, did you choose the function name from the drop down list, and click the run icon?
The first time you run it this way, a pop up will display, stating that authorization is needed. You must give authorization to modify sites. If that hasn’t been done, you’ll get an error.
I ran your code, after authorizing the script, and it worked.
You can go into your account, and check what projects you have given permissions to. You need to choose «Account», and then click «Get Started» in the Security checkup section of the Account settings window.
Fix “You need permission to perform this action” Error
One very annoying Windows problem
Microsoft offers several ways of preventing your files or data from being deleted, renamed or modified in Windows to ensure that your information doesn’t get into the wrong hands.
However, some of these protections can get out of hand, leading to errors such as “You need permission to perform this action”. This can occur when you’re trying to open a file, delete a folder, or run an application. Sometimes Windows may even lock down certain tasks or actions whether you’re an Administrator or not.
If you’ve come across this error, learn how to fix it using the solutions in this guide.
Causes For The “You Need Permission To Perform This Action” Error
There’s no single cause for this error, but the best part is that it doesn’t always pop up consistently. However, there are certain situations when it seems to happen more frequently, such as trying to copy files, change a folder/file name, delete a file or folder, or install a program.
Ideally, such actions shouldn’t have any hitches. If you don’t have the right security permissions, wrongly modified permissions, or the folder or file is locked by a system service or process because it’s an essential file for Windows operations, you could end up getting this error.
The error could also be caused by malware infection or by using certain third-party apps. All these can be frustrating even if you have an administrator account because you can’t create, modify, or even delete any files or folders.
How To Fix “You need permission to perform this action” Error
Your security software – antivirus or firewall – could cause conflicts and errors such as this one. Temporarily disabling your antivirus is the best and safest way of testing this. If it resolves the problem, check with your vendor or switch to better antivirus software options.
Note: While your third-party antivirus software is disabled, turn on Windows Defender, the built-in Windows 10 security software, to give your PC the necessary protection as you try to fix this error.
Disable Third-Party Security Software
One way of disabling your antivirus software is by using the Task Manager. Press CTRL+ALT+DEL keys simultaneously and select Task Manager from the blue security options screen or right-click your taskbar and select Task Manager from the context menu.
In Task Manager, click the Startup tab and check the apps that start when your computer launches. Choose your third-party antivirus app, and click Disable to change its status.
Do the same for every other third-party antivirus app on your PC and restart it. Check whether the error disappears, if not, try the next fix below. If it helps, you can turn off Windows Defender and re-enable your antivirus software.
Run A Malware Scan With Windows Defender
Your PC could be infected with viruses or malware that caused the “You need permission to perform this action” error. Running a malware scan using Windows Defender will check the computer for any such malware and remove them, after which you can check if the error disappears.
To do this, click Start > Settings and select Update & Security.
Click Windows Security from the left menu and select Virus & Threat Protection.
In the new window, click Scan Options link, and select Full Scan. This will most likely fish out and nuke any sneaky viruses or malware hiding in your PC, though it takes longer than a Quick scan.
If the scan found any threats, take the appropriate action after the scan completes, and check whether the error disappears after the scan.
Run An SFC Scan
A System File Checker (SFC) is one of the troubleshooting tools that scans, detects and solves various system issues in your PC.
Open an elevated Command Prompt by typing CMD in the search box and select Run as Administrator.
Enter this command: sfc /scannow
When the scan completes, the SFC scanner will try to fix any identified issues automatically. You can check whether the error disappears when you try performing the same action on your computer.
Add Your Account To The Administrator Group
If there are multiple administrator accounts and you’re trying to access contents of other admins, you could end up getting the “You need permission to perform this action” error message.
Right-click Start and select Computer Management.
Go to Local Users and Groups and double-click the Users folder.
Double-click on your account in the left pane.
Click the Add button on the Member Of tab.
Type Administrators in the Enter the object names to select field, and then click Check Names > OK. Select Administrators, click Apply > OK.
Once your account is in the admins group, check if the error still appears when performing the action you want.
Check If The Folders/Files Are Under a Different Admin Account
Right-click Start > Run to open the Run utility, type netplwiz and press Enter.
In the new window, you’ll see the user accounts and their account types. To change the account type for any other accounts you have with admin privileges, click the Users tab and select the account you want to change under Users of this computer section.
Click Properties.
Click the Group Membership tab and select either Standard or Administrator for the type of user account. Click Apply>OK to finish the process.
Try the action you wanted again and see if the error disappears. If it doesn’t move to the next solution.
Restart In Safe Mode
Previously, Windows users pressed the F8 function key to enter Safe Mode, but that changed because the F8 boot menu was removed in Windows 10 to improve system boot time. You can learn more about this in our guide on Why F8 is not working in Windows 10, but here are the steps to take to restart your PC in Safe Mode.
Click Start > Power, hold down the Shift key and click Reboot to open the Troubleshoot screen.
Click Advanced options.
Next, click Startup Settings.
Select Restart.
Once your PC reboots, press the F4 key to enable Safe Mode, and then try the action again to check if the error disappears while in this mode.
Use Unlocker To Delete A Locked Folder/File
If you’re trying to open a folder and this error appears, you can use the free Unlocker program to identify the programs or processes that are locking your folder.
Note: When installing Unlocker, click Skip a few times when it asks you to install other programs.
Install Unlocker, click Advanced and uncheck Install Delta Toolbar. Once the installation is complete, go to its folder in File Explorer, right-click on it and select Unlocker. You’ll see a pop-up window with a list of the processes or programs locking the folder. If there aren’t any, it’ll tell you that there aren’t any locks.
If there’s a list, you have three options: kill the process, unlock a particular item, or unlock all to release all the locks on the folder.
Get Full Control Permissions Over A File/Folder
Right-click on the file or folder you want to delete or open and select Properties.
Click the Security tab, click Advanced.
Next to Owner, click Change.
In the Enter the object name to select, type your user account name and click Check Names.
Next, click OK and check the Replace owner on subcontainers and objects checkbox.
Go back to the Properties folder and click OK.
If you want to change permissions without taking ownership of the file/folder, right-click the file or folder, select Properties and go to the Security tab and click Advanced.
Under the Access column, check if your user account has Full Control.
If not, or if your user account isn’t on the list, click Add and then click Select Principal link.
Type your local username in the Enter the object name to select field.
Click Check names to validate your user account name and select OK. Mark the checkbox next to Full control so that every action except Special permission is marked.
See if you’re able to perform the action you wanted without the error showing up.
Reinstall The Affected Application
If a particular app has permission issues that causes this permissions error, reinstall it and see if it resolves the issue.
Click Start > Settings > Apps.
Find the app you want to uninstall, select it and click Uninstall. Once uninstalled, re-install the app and see if the error disappears.
If none of these solutions work, you may have to do a clean reinstall of your system but only as a last resort because this action fully cleans your drive. If you go this route, back up your personal files and other data first. You can choose other backup options such as cloud storage, using an external hard drive or migrating your files to a different computer.
Did any of these fixes help resolve the “You need permission to perform this action” error on your computer? Let us know in a comment below.
Elsie is a technology writer and editor with a special focus on Windows, Android and iOS. She writes about software, electronics and other tech subjects, her ultimate goal being to help people out with useful solutions to their daily tech issues in a simple, straightforward and unbiased style. She has a BCom degree in Marketing and currently pursuing her Masters in Communications and New Media. Read Elsie’s Full Bio
Fix “Cannot Delete Folder. You Need Permission To Perform This Action”
Hint: «Mother may I?» doesn’t work
You 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.
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!
Founder of Online Tech Tips and managing editor. He began blogging in 2007 and quit his job in 2010 to blog full-time. He has over 15 years of industry experience in IT and holds several technical certifications. Read Aseem’s Full Bio
Script ran from end-user to run addEditor() shows «you don’t have permission to perform that action»
I developed a script for our users. However, when I test it using the user account (e.g. tester@gmail.com), the permission error shows up but not for me—the owner of the script and sheet.
Is there something missing with my setup or code? Pls let me know if you have alternatives too.
1. Error:
2. From the tester’s account, this is the editor setting:
3. When running the code through these buttons:
4. And when trying to open Script Editor from the tester account, this is what shows up:
5. onEdit code worked flawlessly with other functions. But if I run the function with the script below and assign it to a button within the sheet, then the permission error shows up, just like in #3 above.
My goal is to be able to run a much larger script which modifies protected ranges/sheets using the user account.
The code snippet below where the error occurs is used at the beginning of my larger code.
This is where the error occurs, specifically at protection.addEditor(user) line.
Even when using protection.remove() is not permitted.
This code snippet is to add the current user as an editor so that the user can run the code that edits PROTECTED RANGES/SHEETS
1 Answer 1
Even though you’d shared the spreadsheet with this user, this doesn’t mean that they have access to the protection you have set in place.
If they don’t have permission to edit or access those protected ranges/sheets, they will also lack permission to edit the protections themselves.
It’s also important to notice that the script inherits the permission from the user executing the script, therefore, what you are experiencing seems to be the expected behavior.
Regarding the onOpen simple trigger, it is important to note the following:
They cannot access services that require authorization.
Therefore, since the addEditor requires authorization, you will have to use an installable trigger. However, be mindful of the following too:
Installable triggers always run under the account of the person who created them. For example, if you create an installable open trigger, it runs when your colleague opens the document (if your colleague has edit access), but it runs as your account.
If you want to share the script with multiple users, the best solution in this case is to create an add-on as this will end up solving most authorization issues you seem to be running into at the moment.
Источники информации:
- http://stackoverflow.com/questions/28200857/you-do-not-have-permission-to-perform-that-action
- http://helpdeskgeek.com/windows-xp-tips/you-need-permission-to-perform-this-action/
- http://www.online-tech-tips.com/computer-tips/fix-delete-folder-need-permission-perform-action/
- http://stackoverflow.com/questions/69389840/script-ran-from-end-user-to-run-addeditor-shows-you-dont-have-permission-to