Jelle de Jong
2021-Feb-08 15:35 UTC
[Samba] locking with samba and getting read-only to work with libreoffice
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
Rowland penny
2021-Feb-08 16:04 UTC
[Samba] locking with samba and getting read-only to work with libreoffice
On 08/02/2021 15:35, Jelle de Jong via samba wrote:> 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 >As far as I am aware oplocks should work, so it could be a LibreOffice problem, but it is hard to say because you have done what a lot of people do, they give us very little to go on. You have given us fragments of your smb.conf, please post your entire smb.conf , it may help. Rowland