Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a 2 Windows machines networked and I am having trouble with simultaneous access to files. I would like only one user to be able to open a file at a time, which I thought was automatic, using file locks.... if the program used to access the file is locking the file.

I believe the problem I am having is some of the programs I use, don't lock the file, and there for can be modified simultaneously by multiple users, which is very much not desired.

Currently I am having this problem with only two computers, although as soon as I can figure out a solution to this problem the network is going to be expanded to 6 computers, which will include Windows 7, Vista, and XP, as well as a central file server (Samba).

Is there a way to ensure that all files opened in windows get locked? I have considered some sort of version control system, but all of the ones I have looked at are way too complicated. All I need is to ensure that multiple users can't write to a file at the same time.

Any suggestions are appreciated, thanks in advance.


The suggestions are appreciated, although here are some guidelines I was hoping to fulfill.

  • There is a large number of files and directories that are going to be shared, which will be served by a Samba file server. So managing share access with windows sharing won't be possible.

  • Multiple people need to be able to access a given folder simultaneously.

  • Samba supports file locking, so ideally I would like to force windows to place locks on files, even when the program being used normally wouldn't do so. (Is there a program that can do this?)

share|improve this question
up vote 1 down vote accepted

You could create a shared folder and allow only one connection

enter image description here

share|improve this answer
This does not apply to a samba server. It anyway allows only one user on the whole share. – harrymc Jul 2 '12 at 6:09

The most office files accept modifying on network. You should look at share options. For exe files and folders there are no simple ways. You could organize user files in folders visible only for owner+admin there is well knowm microsoft utility to hide/unhide folders in xp/2003? Other way is organize libraries in 7 for users may it help?

share|improve this answer
UNLOCKER doesn't seem to help me to lock anything, although I am sure it will be helpful once I get the file locks working. I don't need to lock any .exe files or folders. The share options is a good idea, but unfortunately that won't work once I start using the file server. Thanks for the suggestions! – jpetersen Jun 18 '12 at 20:00

Since this is a samba server, you could try to set the share to strict locking.

This option denies access to an entire file if any byte-range lock exists in it.

For more info see Using Samba : Locks and Oplocks.

share|improve this answer
Thanks, although that doesn't seem to have any effect on the programs that don't use file locks – jpetersen Jul 4 '12 at 22:18
Which programs don't use file locks? – harrymc Jul 5 '12 at 5:27
We use a CAD/CAM program called Vector, that doesn't seem to use them. – jpetersen Jul 5 '12 at 16:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .