Answer the question
In order to leave comments, you need to log in
Why don't file locks between Apache and Samba work?
I decided the other day to set up access to 1C Accounting through Samba for those who work in the office and through Apache for remote employees. The distribution kit chose Debian 9.8. That is, it turns out that the database is in file mode and web client mode at the same time. And that's what I came up with to check. I wrote a program that puts an exclusive lock on the 1C base file in the shared folder on Debian. Launched from Windows. I checked it from another Windows - it swears, it cannot open the locked file, and Apache on Debian, which accesses the database file directly, calmly opens and lets it into the database. That is, he does not see the lock at all. Nor does any other Linux process see it. What does this usually mean for a filebase? Of course, the collapse after a while, because the web client and the thick one will climb into the database inconsistently. Attention to the question: what to do, how to make linux (POSIX) processes see samba locks? Tested on default smbd.conf config except for oplocks - turned them off immediately. However, they do not change things. All tried parameters also did not bring results. Please, do not offer connection via a thin client to the same Apache.
Answer the question
In order to leave comments, you need to log in
What database are you going to work with your files on http O_o? I strongly recommend that you think carefully and not do this, because you will create a headache for users.
https://www.oreilly.com/openbook/samba/book/ch05_0...
If you have a system that understands oplocks, set kernel oplocks = yes in the Samba configuration file. That should eliminate conflicts between Unix processes and Windows users.
It's strange to expect Windows lock to work under Linux. If you want to read only - set the appropriate access rights.
What does this usually mean for a filebase? Of course, the collapse after a while, because the web client and the thick one will climb into the database inconsistently.That's bullshit. According to your logic, the fact that thousands of users work in modern DBMS at the same time is a myth, since multi-user access destroys any database.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question