Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Ubuntu 16.04 lts desk; Ubuntu 14.04 server
Posts: 366
Rep:
What affects file locking?
Hi--
We are in a production environment with one WinXP box and several linux boxes.
We have discovered that the WinXP and linux boxes seem to respect each other's file locks, but that the linux boxes do not respect each other's locks. In other words, box 1 can have a file open, and at the same time box 2 can open it and edit and save the file.
We have smb.conf set with level2 oplocks yes, kernel oplocks no, and oplocks no. When we first noticed the problem the last two were set to yes. The change has made the locks work sometimes, but not reliably.
Are there other things besides the oplocks and the smb.conf file which can affect file locking? How would you trouble shoot this?
Unix file system locks are specified by the program itself; if the program does not create or open a file with strict access, other processes can open the file as well.
Another form of locking is cooperative, but this requires all programs to cooperate in the locking protocol.
Distribution: Ubuntu 16.04 lts desk; Ubuntu 14.04 server
Posts: 366
Original Poster
Rep:
Mr. C.--
Thanks for your help.
So are you saying that I need to look into OpenOffice.org for the locking? That might actually explain why some versions of OOo can open a file while others have it open, and other versions cannot....
I don't know what protocols OOo supports, but I can imagine it has an open-for-write exclusive lock feature.
The key point to remember, programs must be written to support locking. Such a program in Unix/Linux is vipw which opens the /etc/passwd file exclusively, where as standard vi/vim would not. Likewise for visudo to the /etc/sudoers file. It is a long established tradition to use these utilities when there are multiple sys-admins who could be opening the same file at the same time.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.