Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have installed a windows server 2008 r2 with file service enabled. I have a network with 5 computers with windows 7 and all are on the same workgroup (I do not have domain controller and active directory). All the computers can connect to the server and see the shared folder and the files.

My question is how can i secure that the files that are in the shared folder open once a time so everytime only one user from the network can edit the specific file.

Thanks in advance, Spiros

share|improve this question
4  
If you're asking how to put a write lock on any particular file, that's a pretty broad question. Typically that's implemented on the program accessing the file, such as Microsoft Word, Excel, etc. You will have to provide more details, or this question is in danger of being closed. –  BigHomie Apr 24 at 13:05
    
As BigHomie said, the software opening the file typically does this on its own. –  Nathan C Apr 24 at 13:14
    
What application? What files? The application should properly lock the files when they are not meant to be written by multiple persons –  MichelZ Apr 24 at 13:14
    
Thanks for your quick response. Yes, that i am asking is how to put a write lock on these particular files (word, excel). Because non of these files have this security policy from the program side when they created i am trying now to configure it from the server side if it is enable. –  Spiros Apr 24 at 13:19
2  
Word, Excel warn you about this when you open a file which another user already has opened. Is there an exact problem you try to solve? Did you have problems with this? –  MichelZ Apr 24 at 13:26

1 Answer 1

up vote 5 down vote accepted

My question is how can i secure that the files that are in the shared folder open once a time so everytime only one user from the network can edit the specific file.

That's built-in by design. It's called opportunistic locking, see here: http://support.microsoft.com/kb/296264

By default, opportunistic locking is enabled for server message block (SMB) clients that run one of the Windows operating systems that is listed in the "Applies to" section. Opportunistic locking lets clients lock files and locally cache information without the risk of another user changing the file. This increases performance for many file operations but may decrease performance in other operations because the server that grants the opportunistic lock must manage the breaking of that lock when another user requests access to the file.

See also: http://msdn.microsoft.com/en-us/library/windows/desktop/aa365433%28v=vs.85%29.aspx

share|improve this answer
    
Thanks for your answer!! –  Spiros Apr 24 at 16:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.