Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2031681

Summary: unable to save libreoffice document on cifs/smb share with libreoffice-core-6.4.7.2-7.el8
Product: Red Hat Enterprise Linux 8 Reporter: farrotin
Component: libreofficeAssignee: Stephan Bergmann <sbergman>
Status: CLOSED ERRATA QA Contact: Tomas Pelka <tpelka>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: CentOS StreamCC: bstinson, jwboyer, pasik, pasteur, tpelka
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libreoffice-6.4.7.2-13.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-16 08:35:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description farrotin 2021-12-13 08:28:19 UTC
Description of problem:

Laptop converted from CentOS Linux 8 to CentOS Stream 8.
Libreoffice updated to libreoffice-core-6.4.7.2-7.el8.
Opening up a document on a NAS share (over cifs/smb) and trying to save it leads to : "Error saving the document <filename>: Sharing violation while accessing the object"

Worth knowing that it doesn't create the usual '.~lock.<filename>.ods#' lock file used over cifs/smb for opportunistic locking, probably reason why it then refuses to save the file

Version-Release number of selected component (if applicable):

libreoffice-core-6.4.7.2-7.el8

How reproducible:

see above

Steps to Reproduce:
1.
2.
3.

Actual results:

Failing to save file

Expected results:

Able to save file, as it was working before

Additional info:

Worth also knowing that the following "fixes" the issue : 

sudo dnf downgrade libreoffice-calc-1:6.4.7.2-5.el8.x86_64

Opening then exactly same file creates the '.~lock.<filename>.ods#' lock file and saving file works as usual/before

Wondering if one of the patches introduced in https://git.centos.org/rpms/libreoffice/c/1433b694d88b45a9bc4a8f3cc30fcc4895916dfe?branch=c8s isn't the one that introduced that issue/regression

Comment 1 Caolan McNamara 2021-12-13 09:04:42 UTC
If either of the two patches highlighted has an effect like this I'd be very surprised. The first should only affect html export a little, and the second only csv export.

Are you able to check libreoffice-core-6.4.7.2-6.el8 though those changes should only affect signed odf documents.

Comment 2 farrotin 2021-12-13 09:09:40 UTC
I also tested -6 and same result as with -7 , reason why I had to downgrade to -5 to be able to save documents again.
Happy to update again to confirm and then downgrade to be able to save my work :)

Comment 3 farrotin 2021-12-13 10:08:31 UTC
Just to confirm that I have the issue with libreoffice-calc-1:6.4.7.2-6.el8.x86_64 (and all libreoffice other pkgs at same version)
I though had a look and doesn't seem to be the .~lock.<filename>.ods# issue as I see it been created so issue must be something different.

Comment 4 Martin Krajnak 2021-12-13 11:27:40 UTC
I can reproduce this:

1.Have a smb share mounted
2.Open Calc -> Insert Some Content -> Save the file to nfs share (This works)
3.Close Calc
4.Open Nautilus go to smb share, open the previously saved document
5.Add some content to spreadsheet
6.Save the document

Result is already mentioned error + I can see some errors comming from SMB service:
Dec 13 12:24:49 rhel-8.6 smbd[53972]: [2021/12/13 12:24:49.270205,  0] ../../lib/util/debug.c:1101(reopen_one_log)
Dec 13 12:24:49 rhel-8.6 smbd[53972]:   reopen_one_log: Unable to open new log file '/var/log/samba/': Is a directory

However, I am nor sure if they are related to actions done from LO since I am seeing a lot of them.

I reproduced this with -7, I'll update to -8 from last week and let you guys know if something changes.

Comment 5 Martin Krajnak 2021-12-13 11:36:47 UTC
It looks to me, that LO cannot overwrite previously saved document, this works:

1.Open Document saved SMB in Calc
2.Add some content
3.Save As -> save document under new name (overwriting lead to the same error)

Now you can edit document and keep saving it to the smb share until you close Calc.

If I run oocalc from terminal, there are no messages in stdout/stderr.

Comment 14 errata-xmlrpc 2023-05-16 08:35:20 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (libreoffice bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:2817