Apr 01 2013

Unable to delete zero byte file, access denied

This post is as much for my own benefit as anyone else's, because I know this will occur again at some point, and by then I've long forgotten how to resolve it. 

I was on my Mac copying a bunch of files on a mounted share on a remote Windows Server 2003 SE SP2. Something went wrong leaving me with a zero byte text file that I could not delete, rename, move or influence in any way. I've occasionally seen this behaviour before (on Windows systems) and only "solved" it by restarting the computer, which wasn't an option on this server. 

The solution:

> Open "Manage Your Server" from the start menu.
> In the Server Roles start page, select "Manage this file server" (in the File Server group)
> This will open the File Server Management window.
> Select the "Open Files" folder.
> Select the offending file in the right pane and disconnect it using the context menu or the button on the left.

This would probably work on a Windows Server 2008 as well, although the menu items and entries would be called something else.