0

I'm not sure if I should be asking this here or on StackOverflow, but here goes:

I'm part of a team maintaining a document management application, and I'm trying to figure out Windows file locking permissions. We use a utility somebody downloaded years ago called psunlock to remotely close all locks on a file. We recently discovered that this does not work across different domains on our VPN. A little bit of digging lead me to the samba manual's discussion of file locking. I still don't really "get it", though.

Does anyone have any insight to share into how the process of locking and breaking locks on files works in a network context? My thinking is that privileges are required both on the file appliance and on the client workstations which hold locks. Is that accurate? Can anyone give a more specific version? Ideally I'm looking for something along the lines of A user must have privilege level X in order to break locks held from a client workstation. In practice I'd be happy with a hotlink to a good white paper on the subject.

John Gardeniers
  • 27,458
  • 12
  • 55
  • 109
Mike Burton
  • 101
  • 1

1 Answers1

0

I've never tried forcibly unlocking a file with anything less than full admin rights and would expect that to be the the requirement. There is no requirement for the client end, as the lock must be removed on the machine on which the locked file resides and the other end, whether it's on the same machine or elsewhere on the network, is irrelevant.

When reading your question the first thing that came to my mind is that there should normally be very little need to do such things, yet you make it sound like a routine task. Might I suggest you worry less about how to unlock files and start investigating why the need exists at all?

John Gardeniers
  • 27,458
  • 12
  • 55
  • 109
  • The need exists because the program holding the lock does so even when opening a read-only copy of the file, and may hold locks to many different files simultaneously because the files reference one another. We need to allow multiple users to have the file open for read while allowing users to "check in" a new copy of the file to the main vault. Changing any of that is not an option. – Mike Burton Oct 30 '09 at 02:41
  • I suspect we may not be talking about the same thing. I'm referring to file system locks. The kind that prevent you from deleting a file even when it's not supposed to be in use. – John Gardeniers Oct 30 '09 at 03:50
  • I'm not terribly well educated about it, unfortunately, so you may well be right. I assume "lock" is the right word for the behaviour I'm talking about, but maybe it isn't. – Mike Burton Oct 30 '09 at 13:53