Recently a number of users on a win2003 server are being told that files are locked for editing when they try to open them. Usually they are told they have it open. Usually there is no evidence of that in the File Server Management under Open Files.
It is NOT a case of this being marked for editing on the client side, that I can tell. I have checked for this dozens of times. Indexing is not on, on this server. No backup processes are running. In short I have no idea of the cause.
I know that a restart will usually resolve this, but that is just not possible in a work environment when it occurs. So I feel compelled to wonder if killing whatever is causing the lock is possible... A search online turns up lots of apps that will unlock files. This does not really solve the cause, but I have to get work done in the mean time too.
How safe are they generally? Would you do this? Or what would you do?
additionally I should note that I used handle from sysinternals to close a locked file, and see no obvious problem, but still wonder. I believe it is the way excel files are closed which is causing this issue
In the general case, without specific knowledge of why there is a lock being held, HIDEOUSLY unsafe.
As a user you must assume that when files are locked there's a good reason -- some program has claimed that it is doing things to that file that cannot be interrupted by any other program or the seas will turn to blood, fire and brimstone will rain from the skies, and your dog will elope to Canada with the neighbor's fish.
If you revoke the lock with some kind of hackery (or a program that induces said hackery) you may incur the afore-mentioned biblical punishments, as well as the Righteous Wrath of the user whose file gets corrupted.
Better to find out the why behind the lock, and address the problem at its source.
Unless the person using such a tool has the experience and knowledge to make an intelligent and informed decision about whether it should even be used in any given situation they should be prevented from doing so.
I routinely us unlocker but never without looking to see what is holding the file locked and ensuring there are no more "polite" ways to achieve the same end. Because of the very real potential for damage I won't allow the users access to the same tool.
As others have said, I wouldn't trust unlocking programs to close file locks properly and I prefer to actually find out what is locking the file and either gracefully close it, or kill its process once I am aware of the ramifications of that.
It could be something like an on-access antivirus scanner on the client machine (which would maybe explain why they had it locked), but without actually seeing what has a handle on the file you will never know.
Fire up Process Explorer on the server and go to Find => Find Handle or DLL... Enter the name of a locked file into the dialog box and you will be told which processes have a handle on the process. In this example, you can clearly see it's Excel, but I've had this on my personal machine before where I couldn't move a file and it turned out to be my backup application which copies files to the cloud almost as soon as they are created.
Once you know what's locking the file, you can either choose to close it gracefully if possible, terminate it's process or even run Process Monitor to try and figure out why it's locking the file (that might be a pointless exercise, but might give you additional clues).