How do I lock a file for editing that's stored on a shared folder?
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
Related videos on Youtube
Spiros
Updated on September 18, 2022Comments
-
Spiros almost 2 years
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
-
MichelZ about 10 yearsWhat application? What files? The application should properly lock the files when they are not meant to be written by multiple persons
-
Spiros about 10 yearsThanks 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.
-
MichelZ about 10 yearsWord, 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?
-
Spiros about 10 yearsoplocking was not enabled from server side. That was the problem. Thanks a lot everybody for your answers
-