Using Windows 10 I had to change my user with one that uses Active Directory (AD), meaning I got a new SID and %userprofile% path. After copying and adjusting hopefully all files, settings, and some ACLs, I have a problem that LibreOffice Writer complains being unable to lock a file (like "file is locked for editing by unknown user"), suggesting to open it read-only, or to open a copy of the file. When I try to edit a copy, Writer complains "Write error. Could not write file".

I have no idea where the problem could be (the error details are quite poor), so I checked these already:

  • Directory and file owned by current SID with full access
  • I can create a copy of the file in question in the same directory
  • Other files have the same problem

What else could I check?


I think I found the problem and the solution: %appdata%\LibreOffice\4\user\registrymodifications.xcu contains a list of recently opened documents (and possibly other paths). After replacing all occurrences of "C:\Users\old_username" with "C:\Users\new_username", I could open the file without complaint.

(This solution was inspired by https://ask.libreoffice.org/en/question/75637/problem-with-locked-odt-files/)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.