我有一个由MSBuild生成的文件夹app.publish
。通常,我的构建脚本无法删除它,抱怨它没有必要的权限。今天,我在构建脚本之外进行了测试,发现我什至无法打开它。
如果我尝试打开它,则会收到以下消息:
“位置不可用。访问被拒绝。”
因此,我尝试更改权限,但即使以管理员身份也无法看到所有者是谁:
So then I thought it might be a problem with Explorer, so I tried from PowerShell. Unfortunately, access is also denied there. I tried using Get-ACE -Path app.publish
, but that also refused to work: "Access is denied." I also tried icacls app.publish /grant ijhbvhbv:f
, but that too failed and said "Access is denied." I tried both of these commands both as my regular user, and as the administrator.
Finally, I tried to delete the parent directory, but was told I had to "provide adminstrator permission to delete this folder". When I did, I got a curious error: "You require permission from FWEE-ERIC-WIN8\ijhbvhbv to make changes to this folder". "FWEE-ERIC-WIN8\ijhbvhbv" is my own account. So it seems that I am indeed the owner of the folder, but only when I try to interact with it as the administrator.
关于SU的其他问题都将UAC视为问题的潜在根源,但是无论UAC设置为什么,问题都是相同的。
在解决类似问题上花了太长时间后,我才知道了。
这发生在以下文件夹中:
该文件夹已被删除,处于“僵尸”状态,但某些进程仍在使用中。您需要找到使用它的进程并关闭它,或者,如果不知道它是哪个,请重新启动计算机。
文件夹不见了。如果删除了整个子树,但只使用了其中一个文件夹,则可能需要返回并手动清理子树。这应该与管理员权限一起使用。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句