The lock file could not be created for exclusive access by LibreOffice …

macOS Sequoia 15.6.1
Libre Office Version: 25.8.1.1
Email client: Apple Mail 16.0

I’ve recently moved from NeoOffice to LibreOffice and have set all MS Windows Office file types to open in LibreOffice.

When I try to open a MS Windows Office attachment directly (double click) in an email I get a warning:

“The lock file could not be created for exclusive access by LibreOffice, due to missing permission to create a lock file on that file location or lack of free disk space.”

There is plenty of free disk space so I assume it is a permissions issue …?

If I move the file to the desktop, it’s not a problem.

I guess Apple Mail has the attachments in a temporary system folder which LibreOffice is not allowed to access?

This doesn’t happen with any other application (Pages, TextEdit, MSOffice, …) just with LibreOffice.

I see this was a problem with LibreOffice in the past.

Suggestions to stop it happening with my current set up, please.

Thanks.

sounds like a reasonable guess

see Expert Config UseLocking as described in Ho to solve "The lock file could not be created for exclusive access by libreoffice ..." problem? - #4 by anon73440385

Yes, I did find that but as it refers to LibreOffice 5.4 and LibreOffice 6.3 it didn’t seem relevant as I’m on LibreOffice 25.8.1.1 …

In any case, the instructions to access the setting didn’t make sense. However, having been pointed as this again, I spent some more time digging. I finally found the route in LibreOffice 25.8.1.1 running on macOS 15.6.1 which is:

LibreOffice → Preferences → LibreOffice → Advanced → Open Expert Configuration → Search: UseLocking → set Misc parameter to false.

But this universally disables the locking process which doesn’t seem such a great idea to me.

Why does LibreOffice want to implement a locking system which causes such problems when no other application I’ve discovered has this issue?

Perhaps you need to enable Full Disk Access in MacOS for LibreOffice?

That solves the issue :slightly_smiling_face:

Normally, when installing and using an app for the first time, it asks about disk access - LibreOffice didn’t.

However, going in to System Settings, I added LibreOffice and gave it Full Disk Access. Problem solved.

So, still a bug but considerably smaller than it seemed.

Thanks

no impact when editing standalone.

Lock file

Ask/Guide - How to use the Ask site - The Document Foundation Wiki #Mark_an_answer_as_Solution