在尝试做最简单的事情时,您总是可以依靠Windows向您抛出大量烦人的错误。(Windows)例如,删除一个文件夹!我试图在我的Windows 7 机器上删除一个文件夹,但最终收到以下错误消息(error message):
无法删除文件夹。需要权限来执行此操作。 (Cannot delete folder. You need permission to perform this action. )
那么电脑的管理员需要权限才能删除管理员创建的文件夹吗?感谢视窗(Windows)。显然,我的第一个想法是权限问题,但知道Windows是如何工作的,你也永远不能相信错误消息(error message)。不幸的是,在处理“您没有权限”问题(” issue)时,它要么是实际的权限问题(permission issue),要么是因为文件或文件夹(file or folder)被进程锁定。
在这篇文章中,我将向您介绍可以尝试解决此问题的不同方法,从更简单的不太可能工作的解决方案开始,然后是最确定但需要更多工作的解决方案。
方法 1 – 以安全模式重启
首先尝试最简单的方法是以安全模式重新启动Windows并(Safe Mode)尝试(Windows)从那里删除文件夹。您可以阅读我之前关于如何在安全模式下重新启动Windows 2000/XP/Vista/7Windows 8的启动方式与以前的Windows版本不同,因此请阅读我之前关于如何将Windows 8启动到安全模式的帖子。
如果您能够在安全模式下删除该文件夹,则意味着某些进程基本上保留了该文件夹并阻止 Windows 删除它。如果您仍然无法删除它并收到权限错误,请继续阅读下文。
方法 2 – 更改权限
通常,此错误将与实际的权限问题有关,因此在尝试其他选项之前,至少让我们解决这个问题。继续并右键单击该文件夹并选择Properties。
接下来,您要单击“安全(Security)”选项卡,然后单击“高级(Advanced)”按钮。
现在您要单击左下角的更改权限(Change Permissions)按钮。
现在是有趣的部分。它看起来确实很复杂,这就是为什么您必须正确执行此部分的原因,否则您会认为您设置了正确的权限,而实际上它们是错误的。
首先,继续并选中(check)将所有子对象权限替换为此对象的可继承权限(Replace all child object permissions with inheritable permissions from this object)框。然后继续并取消选中(uncheck)包含此对象父级的可继承权限(Include inheritable permissions from this object’s parent)框。当您取消选中该框时,您会看到一个警告框(warning box),您必须在其中选择“添加(Add)”或“删除”。继续并单击添加(Add)。
现在,一个可删除的普通文件夹应该类似于上面的SYSTEM、Administrators和具有完全控制(Full Control )且Type设置为Allow的用户 ( Aseem ) 。此时,您需要查看不同之处并使用“添加(Add)”、“编辑”和“删除”按钮(Edit and Remove buttons)让您的权限看起来像这样。
如果您在Type中看到任何带有Deny的权限,请继续删除它们。接下来确保(make sure)添加您的用户名和管理员(Administrators)组并赋予他们完全控制权(Full Control)。只需单击(Just click)添加(Add)并输入您的Windows 帐户的(Windows account)用户名(user name),然后单击检查名称(Check Names)。我的Windows 用户(Windows user)名是Aseem,所以我输入它并单击按钮,它会自动将其更改为WINDOWSMAC\Aseem。
对管理员做同样的事情,只需输入单词并单击Check Names。如果SYSTEM不存在,请继续添加,也只是为了安全起见。完成并且权限看起来正确后,继续并单击确定。如果文件夹很大并且有很多子文件夹,则可能需要一些时间。完成后,继续尝试删除文件夹!
方法 3 – 尝试解锁
Unlocker是一个免费程序,它可以很好地告诉您当前哪些程序或进程正在对文件夹进行锁定。请注意,当您安装它时,您确实需要确保您没有安装任何特价软件(offer software)。该程序不是恶意软件或间谍软件,但它确实要求您安装其他程序,因此您必须单击跳过(Skip)几次。
安装后,它会在您的右键单击上下文菜单(context menu)中添加一个选项。转到Explorer中的文件夹,右键单击并选择Unlocker。
现在,您将看到一个弹出窗口,说明当前没有锁定,或者您将获得在文件夹上具有锁定的进程/程序的列表:
可能列出了许多进程,因此您在底部有几个选项。您可以终止进程、解锁或(unlock or unlock)全部解锁。
解锁(Unlock)将让您选择一个特定的项目并将(item and unlock)其解锁。如果要释放文件夹上的所有锁定,只需单击Unlock All。这是一个非常有效的工具,通常可以解决您的问题。如果上述方法均无效,则您的最后选择如下。
方法 4 – MoveOnBoot
如果没有其他方法起作用,那么您可以尝试其他一些方法。一种是在Windows(Windows)完全启动之前尝试删除文件。为此,您可以使用名为MoveOnBoot的程序。它是免费软件,工作方式与(freeware and work)Unlocker之类的程序不同。
您基本上安装它,告诉它您要删除哪些文件或文件夹无法删除,然后让它重新启动计算机。它会在程序中让您知道它是否能够删除该文件夹。
方法 5 – 使用启动盘
该程序仍然在Windows中运行,并且有时它可能无法运行。在这方面,无论权限或是否锁定,删除文件夹的唯一(folder regardless)可靠方法是使用(surefire way)启动盘(boot disk)。这肯定更复杂,但使用这种方法,你可以删除任何你想要的东西。
基本上,引导盘(boot disk)是可引导的 CD/DVD,它加载操作系统或 DOS(OS or DOS)界面,然后您可以运行删除分区、删除文件、修复主引导(master boot)记录等命令。大多数引导磁盘(boot disk)对于我们想要做的事情来说都是多余的,但如果没有其他工作,它就会完成工作。
我不打算在这里详细介绍如何使用启动盘(boot disk),因为这些站点中的大多数都有自己的文档,但是如果您花一点时间,这并不太难。以下是您可以下载的免费引导磁盘映像列表:
http://www.bootdisk.com/ntfs.htm
http://www.ultimatebootcd.com/index.html
http://www.boot-disk.com/product_overview.htm
如果您在使用上述方法之一时遇到问题,请随时发表评论,我们会尽力提供帮助。方法5可能有点复杂,所以如果您有任何问题,请随时提问。享受!
Fix “Cannot Delete Folder. You Need Permission To Perform This Action”
You can always count on Windows to throw massively annoying errors at you whеn trying to do the simplest of things. For example, deleting a folder! І tried to delete a foldеr on my Windowѕ 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:
http://www.bootdisk.com/ntfs.htm
http://www.ultimatebootcd.com/index.html
http://www.boot-disk.com/product_overview.htm
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!