Error saving the document Untitled 2: Write Error. The file could not be written

I receive an error whenever I try to modify a Docbook file. Here are the steps I use to create a simple example of the issue. I appreciate any advice.

From the Start Center:

  1. Create Writer Document
  2. Type “Hello world”
  3. File > Save
  4. Set File Type = Docbook (.xml)
  5. Press Save button
  6. File > Save (to confirm that saving causes no issues)
  7. File > Close
  8. File > Open Document
  9. Select “Untitled 1.xml”
  10. File > Save
  11. Notice the Error dialog that reads “Error saving the document Untitled 1: Write Error. The file could not be written.”

Add soffice.bin to your anti-virus anti-ransomware allowed list. You might need to navigate to the folder (for Windows probably C:\Program Files\LibreOffice\program) and start typing before you can select it.

Check the location of your temp folder, on windows both %tmp% and %temp%. On my system, those had been set temporarily to an external drive, and I forgot to set them back to the usual location. The external drive was no longer attached. Strange errors occurred. Set them both back to where they should be, on windows “C:Users<username>\AppData\Local\Temp”, and this LibreOffice error went away.