views:

1477

answers:

5

I want to known who is locking a file on a network share.

Here is the problem : the network share is on a NAS, so I can't log on. I need a tool to find out remotely who is locking the file. It is not practical to reboot the NAS every time, because there are several users.

Handle.exe, Process Explorer and PsFile seems to be limited to files on the local machine, so they don't work for me.

+2  A: 

The sessions are handled by the NAS device. What you are asking is dependant on the NAS device and nothing to do with windows. You would have to have a look into your NAS firmware to see to what it support. The only other way is sniff the packets and work it out yourself.

Well this a good answer with common sense. Sadly this NAS does not offer this functionality.
olorin
A: 

sounds like you have the same problem i tried to solve here. in my case, it's a Linux fileserver (running samba, of course), so i can log in and see what process is locking the file; unfortunately, i haven't found how to close it without killing the responsible session. AFAICT, the windows client 'thinks' it's closed; but didn't bother telling the fileserver.

Javier
Sounds likely : as far as I know our NAS used a custom linux distro.
olorin
A: 

Partial answer: With Process Explorer, you can view handles on a network share opened from your machine.

Use the Menu "Find Handle" and then you can type a path like this

\Device\LanmanRedirector\server\share\
olorin
+2  A: 

Just in case someone looking for a solution to this for a Windows based system or NAS:

There is a built-in function in Windows that shows you what files on the local computer are open/locked by remote computer (which has the file open through a file share):

  • Select "Manage Computer" (Open "Computer Management")
  • click "Shared Folders"
  • choose "Open Files"

There you can even close the file forcefully.

Dirk Paessler
You can even use Action -> Connect to another computer to the file on a NAS, and it even works with our linux based NAT! Why didn't I try this earlier?
olorin
+1  A: 

This is based on the answer by Dirk Paessler.

  • Go to Control Panel, Administrative tools
  • Select Manage Computer
  • Open the Action menu, select Connect to another computer, enter your NAS name
  • click Shared Folders
  • choose Open Files

As Dirk said, you can see open files and who opened them. This is working with our linux based NA, but I can't close handle forcefully.

olorin