Why do I get "Write Error. The file could not be written." when I try to access any of my documents

What can I do about it?

Please tell version and operating system. Are you able to write and save a new document? Does something changed in the meantime, e.g. updates? It seems, that LibreOffice has worked before?

When I get this message, I open the Task Manager, I locate LibreOffice and I click End Task.
Then I can open my libreOffice files again.

It is probably an anti-ransomware setting somewhere

Mac

You probably need to give LibreOffice full disk access from System Preferences > Security & Privacy. See this site on how to do it if you aren’t sure: Explained: What is Full Disk Access & Full Permissions on macOS Mojave .

Windows

If you don’t have a third party anti-virus have a look at this: Defender Controlled Folder Access

Allow LibreOffice access to controlled folder

The below numbered list is from Use the Windows Defender Security app to allow specific apps

  1. Open the Windows Security by
    selecting the shield icon in the
    task bar or searching the start menu
    for Defender.
  2. Select the Virus & threat
    protection
    tile (or the shield
    icon on the left menu bar) and then
    select Ransomware protection.
  3. Under the Controlled folder
    access
    section, select Allow an
    app through Controlled folder
    access
  4. Select Add an allowed app and
    follow the prompts to add apps. You
    need to allow access to
    soffice.bin

Turn Off Defender

Select Start > Settings > Update & Security > Windows Security > Virus & threat protection.
Under Virus & threat protection settings, select Manage settings.
Under Controlled folder access, select Manage Controlled folder access.
Switch the Controlled folder access setting from On to Off.

3rd Party Anti-virus

If you do have a third party anti-virus go into settings and then look for something like anti-ransomware or folder protection. Have a look at the blocked apps list, if you see soffice.bin in there change it to Allowed (you might have to read AV help if not obvious). Otherwise go to the Allowed Apps setting and allow soffice.bin, this might not be easy so you might have to add the different LibreOffice executables (Calc, Writer, etc.) to the Allowed list. Note that 3rd party anti-virus might make files Read Only so you can create a new file but you can’t save it subsequently. Sometimes, you might need to reboot after allowing a program access.

Cheers, Al