[Samba] locking with samba and getting read-only to work with libreoffice

Jelle de Jong jelledejong at powercraft.nl
Mon Feb 8 15:35:19 UTC 2021


Hello everybody,

I been experiencing some challenges with samba and locking with LibreOffice.

The expected behaviour is that userA can open an file with LibreOffice 
(that also creates its own lockfile) and that userB can open the same 
file gets a warning that the file is in use (this is working) then gets 
the option to read-only of make a copy, but this does not work. The file 
becomes impossible to read to other users when it gets opened. I do not 
know why or how....

The file manger is also creating errors when opening a file with 
LibreOffice but try to make a copy from an other system on the share.

I get error like:

Data could not be read from file.
Error splicing file: Permission denied

smbstatus:
1716515      1376000004  DENY_NONE  0x12019f    RDWR       NONE 
    /srv/storage/shares   Iedereen/shared_file_test_01.docx   Mon Feb  8 
16:28:28 2021

I tried some of the options bellow but no luck...

#       oplocks = no
#       level2 oplocks = no
         veto oplock files = /.~lock*/

#       oplocks = no
#       locking = no
#       strict locking = no
#       blocking locks = no
#       kernel oplocks = no
         posix locking = no

# testparm --version
Version 4.12.3

Can somebody help me out? Can you get LibreOffice read-only access 
working on opened files on your samba shares?

Kind regards,

Jelle de Jong



More information about the samba mailing list