Bug 1898073

Summary: LibreOffice doesn't preserve facls (create new files on save and ignores old facls)
Product: [Fedora] Fedora Reporter: Edgar Hoch <edgar.hoch>
Component: libreofficeAssignee: Caolan McNamara <caolanm>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 32CC: caolanm, dtardon, erack, sbergman
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
URL: https://bugs.documentfoundation.org/show_bug.cgi?id=138252
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-16 11:45:00 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 Edgar Hoch 2020-11-16 10:25:01 UTC
Description of problem:
When LibreOffice saves a file, it removes the old file and creates a new file.
But it doesn't preserve facls.

Instead, LibreOffice should either write the new content in the same file (creating a backup file as a new file before modifying the original file), or create the new file with exact the same permissions, facls, SELinux context, etc. as the old file.


Version-Release number of selected component (if applicable):
libreoffice-6.4.7.2-3.fc32.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Open LibreOffice.
2. Create new LibreOffice document and save it
   (on a local file system, so we can use setfacl and getfacl)
3. Check facls:
   getfacl filename
4. Set some facls, for example
   setfacl -m g:wheel:rw- filename
5. Check facls:
   getfacl filename
6. Note which inode the file has, for example with stat:
   stat filename
7. Open the file in LibreOffice, change something, so it is modified, and save it.
8. Check if the file has the same or another inode now:
   stat filename
9. Check facls:
   getfacl filename


Actual results:
FACLs are lost.

Expected results:
FACLs are preserved.

Comment 1 Edgar Hoch 2020-11-16 11:56:28 UTC
Does the fact that you immediately closed this bug report mean that I should not open a bug report at Fedora when I report the bug upstream?

Comment 2 Caolan McNamara 2020-11-16 16:34:13 UTC
its just reflects that I have limited resources and probably will not personally implement this, but someone upstream might take it on