为什么我不能在Windows Server 2008中删除文件“favicon.ico”?

我已经将文件favicon.ico从Windows 2008中的一个网站文件夹复制到另一个网站文件夹。

现在我不能删除这个文件,也不能以pipe理员身份在安全选项卡中更改它的所有者。

我如何重新获得访问权限?

我发现Sysinternals Handle是一个方便(免费)的工具,用于这些目的。

 C:\path\to\handle.exe c:\path\to\favicon.ico 

但是,handle.exe只能和本地句柄一起工作,并不能告诉谁打开了这个文件。 这个VBS脚本找出谁打开了这个文件,它可以检查远程服务器上的文件:

 ' WhosGotItOpen.vbs strServername = "." ' A dot is the same as current computer. ' If you want to check remote server, replace dot with the name of the server. strFilename = "myfile.ext" ' Put the name of your file here. ' Can be also be piece of the path, like: "folder\myfile" Set objFileSystem = GetObject("WinNT://" & strServername & "/LanmanServer") If (IsEmpty(objFileSystem) = False) Then For Each Resource In objFileSystem.Resources If (Not Resource.User = "") And (Not Right(Resource.User,1) = "$") Then If Instr(1, Resource.Path, strFilename ,1) > 0 Then WScript.Echo Resource.user & ";" & Resource.Path End If End If Next Else WScript.Echo "Error in filesystem , quitting." WScript.Quit(2) End If 

听起来像文件有一个开放的句柄,防止任何修改。 您是否尝试过运行Process Explorer或其他实用程序来search打开的文件句柄,并查看哪个进程被locking?