SMB oplocks between WIndows/LInux wh LINUX SERVER

I will be as clear as possible.

I have :

  • Installation with my ip external adress let’s call it: MYIP
  • Synology with SMB server with ip : SMB_IP
  • Debian with Nextcould server(Cloud under GPL) installed (with appache2,mysql8.0…) in MYIP
  • Onlyoffice DocumentServer(integreted to Nexcloud)

first goal : mount SMB/CIFS of a “network share” on my Debian/Nexcloud server. Let’s call it EXTERNAL_SHARE.

Succeeded this way :

  1. Connect to the SMB_IP via VPN
  2. Then mount -t cifs //{SMB_IP}/EXTERNAL_SHARE

In NextCloud I connect to this EXTERNAL_SHARE which become a local share once mounted so I can browse it in the cloud (with http browser) without any problem!


  • this famous EXTERNAL_SHARE is used localy also by a local group in the SMB_IP.
  • In the external LAN (SMB_IP) the group uses Windows and its explorer to work on files, expacially Office files. And I use Onlyoffice integrated in my Nextcloud to work on those same files.
  • So we can overwrite the work of eachother because there is no locks on files exists or works (espacially the one of SMB protocol “OPLOCKS”). It works with windows users but not with me (nextcloud/onlyoffice user).
  • I have no information or warning If I open a file for editing if it is already opened in the external Netwok and other side either no warningor lock if opened by me nextcliud/onlyoffice so welcome to overwritten/conflicted/corrupted files…

What can I do to avoid this, to let OPLOCKS works on my side (nexcloud/onlyoffice) : get and send lock requests to the SMB servers?

Thank you in advance!