https://bugs.documentfoundation.org/show_bug.cgi?id=171008

            Bug ID: 171008
           Summary: Windows 11 + SMB share: 64-bit LibreOffice Writer sets
                    Windows ReadOnly file attribute after saving ODT file
                    (atomic replace); 32-bit build does not
           Product: LibreOffice
           Version: 26.2.0.3 release
          Hardware: All
                OS: Windows (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: [email protected]
          Reporter: [email protected]

Description:
We are observing reproducible incorrect Windows file attribute behavior when
saving documents to an SMB network share using the 64-bit version of
LibreOffice on Windows 11.

After the first successful save operation, the file receives the Windows file
system "Read-only" attribute. Subsequent save attempts fail with:

"Error saving the document… Access to X:...\file.odt was denied."

This is not related to LibreOffice’s internal document protection, lock files,
or "Open as read-only" mechanisms.

The Windows file attribute itself is set at the file system level (visible in
Windows Explorer properties dialog and via attrib command).

The issue does not occur with the 32-bit version of LibreOffice on the same
system.


Environment

Windows 11 Pro 25H2, Build 26200.7840
LibreOffice 26.2.0 (64-bit) → Issue occurs
LibreOffice 25.8.5 (64-bit) → Issue occurs
LibreOffice 25.8.5.2 (32-bit) → Works correctly
Synology DSM 7.3.2-86009 Update 1
SMB3 network share


Additional Observations

This is not caused by LibreOffice’s internal locking mechanism (.~lock files).

It is not related to LibreOffice’s own document-level read-only or protection
features.

No "document is read-only" banner or internal protection state is shown inside
LibreOffice.

DSM logs show correct tmp file creation, rename, and delete operations under
the correct user.

File ownership and ACLs remain correct on the NAS.

The issue appears to be triggered by the atomic replace save mechanism.

Text files edited via Notepad on the same SMB share do not show this behavior.

The problem is fully resolved when using the 32-bit build of LibreOffice on the
same system.

This suggests a difference in Windows file handling or API usage between the
64-bit and 32-bit builds when performing atomic replace operations on SMB
shares.

Steps to Reproduce:
1. Open an existing .odt file located on an SMB share.

2. Modify the document.

3. Save the file (first save succeeds).

4. Attempt to save again.

Actual Results:
- The file receives the Windows file system ReadOnly attribute.

- The attribute is visible in the Windows file properties dialog.

- attrib filename.odt shows the R flag.

- Subsequent save attempts fail with "Access denied".

- The ReadOnly attribute persists even after closing LibreOffice.

Expected Results:
Repeated saves to an SMB share should not set the Windows file system ReadOnly
attribute or cause subsequent save operations to fail.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 26.2.0.3 (X86_64)
Build ID: 620(Build:3)
CPU threads: 24; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Vulkan;
VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: CL threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to