[Dropped] LibreOffice unable to save some documents in Cryptomator Vault

Help with installation and general system troubleshooting questions concerning the office suite LibreOffice.
Post Reply
Learning25
Posts: 11
Joined: Wed Sep 28, 2022 9:59 pm

[Dropped] LibreOffice unable to save some documents in Cryptomator Vault

Post by Learning25 »

Using LibreOffice 7.4.1.2 on Windows 10 Pro

I have tried every recommendation I have come across on this forum and still haven't solved the problem.

The issue:

I had some documents from an encrypted Cryptomator Vault open when Windows 10 Pro decided to restart to apply a Windows update.

I can open, edit, and save any and all .docx documents using MS Word 365 without any issue (I have been testing LibreOffice before I get rid of MS Word).

I can open, edit, and save SOME .docx files in LibreOffice Writer without a problem, but other .docx files (contained in the same folder and perhaps the ones that were open during the computer restart) I cannot save after editing.

When I open, edit, and attempt these certain .docx files in LibreOffice Writer I receive an error message that says, "Error saving the document [filename]. The file [filepath/filename] is locked by another user. Currently, another write access to this file cannot be granted."

What I have tried:

- Windows Security > Virus and threat protection > Manage Ransomware > Controlled Folder Access is OFF (so I did not have to give permission for soffice.bin file as described here https://forum.openoffice.org/en/forum/v ... 07#p467580 )

- Completely disable Windows Defender antivirus

- Set Windows Explorer to View Hidden Files and navigated to the document folder as well as to %appdata%\LibreOffice\4 but there is no .lock file anywhere to be found as described here: https://forum.openoffice.org/en/forum/v ... p?t=107895

- Rename extensions.pmap (I did not have extensions.db) in the folder AppData > Roaming > LibreOffice > 4 > User > Extensions > Bundled

- Rename user folder to user.old in AppData > Roaming > LibreOffice > 4

Any suggestions?
Last edited by MrProgrammer on Mon Oct 10, 2022 4:49 pm, edited 1 time in total.
Reason: Dropped: No response from Learning25 -- MrProgrammer, forum moderator
LibreOffice 7.4 with Windows 10 Pro
User avatar
Hagar Delest
Moderator
Posts: 32653
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: LibreOffice unable to save some documents due to file being locked by another user

Post by Hagar Delest »

Hi and welcome to the forum!

If you copy the files to change their name, can you then edit them?
I would say that there is lock managed by your encryption application and that remained when LO was editing the files. Thus until you know how it works, few chances to get rid of it. Have you tried the Cryptomator support?
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
Learning25
Posts: 11
Joined: Wed Sep 28, 2022 9:59 pm

Re: LibreOffice unable to save some documents due to file being locked by another user

Post by Learning25 »

Hello, and thank you for the quick reply.

As I explained above, I have no problem opening, editing, and saving the file with MS Word 365, so how could it be a Cryptomator issue?

As you suggested I changed the file name (via Windows Explorer), opened it in LibreOffice and still experience the same problem.
LibreOffice 7.4 with Windows 10 Pro
Learning25
Posts: 11
Joined: Wed Sep 28, 2022 9:59 pm

Re: LibreOffice unable to save some documents due to file being locked by another user

Post by Learning25 »

Also of note, I've been using LibreOffice with Cryptomator files without issue until the Windows restart. Windows 10 Pro v10.0.19044
LibreOffice 7.4 with Windows 10 Pro
User avatar
Hagar Delest
Moderator
Posts: 32653
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: LibreOffice unable to save some documents due to file being locked by another user

Post by Hagar Delest »

You have changed the name by copying the file or renaming?
Try to make a copy, delete the initial file and rename the copy. Maybe the lock is linked to a hash of the file and thus will not be linked to the "new" file anymore.

Maybe it would have happened if the files had been opened with MS Office.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
Learning25
Posts: 11
Joined: Wed Sep 28, 2022 9:59 pm

Re: LibreOffice unable to save some documents due to file being locked by another user

Post by Learning25 »

Made a copy of the file, renamed it, deleted the original and the problem persists. MS Word still has no problem opening, editing, and saving the file.
LibreOffice 7.4 with Windows 10 Pro
User avatar
Hagar Delest
Moderator
Posts: 32653
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: LibreOffice unable to save some documents due to file being locked by another user

Post by Hagar Delest »

And if you open it and save as another name, are you able to edit it afterward?
If so, if you rename it to the original name, do you still get the access denied?
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
Learning25
Posts: 11
Joined: Wed Sep 28, 2022 9:59 pm

Re: LibreOffice unable to save some documents due to file being locked by another user

Post by Learning25 »

I cannot save the newly renamed file after I edit it in Libre. It behaves just like the original file. I can edit and save the new file in MS Word, but even after that Libre still cannot save the file after I edit it in Libre.
LibreOffice 7.4 with Windows 10 Pro
Learning25
Posts: 11
Joined: Wed Sep 28, 2022 9:59 pm

Re: LibreOffice unable to save some documents due to file being locked by another user

Post by Learning25 »

Okay, I figured something out.

Everything up until now (copying, renaming, editing, etc) I have been doing within folders that exist in the Cryptomator vault.

Just now I decided to copy one of the problem files to my desktop (i.e. outside of the vault) and Libre was able to edit and save it! But when I move the file back to the vault Libre is once again unable to save it after editing! I get the same exact error as mentioned in the beginning. As usual MS Word has no problem editing and saving the file.

So there is some strange anomaly that exists between Libre and Cryptomator that was created when any files in the Cryptomator vault were open in Libre when Windows did an auto-restart. And what's even more strange is that no matter how many times I copy, rename, edit, and save different files in MS Word, the file still contains something that is corrupted so that Libre can no longer save it after editing.

The only way I can get the contents of the file savable again in Libre is to open the file in MS Word, copy and paste all of the contents into a new LibreWriter document, and save it.
LibreOffice 7.4 with Windows 10 Pro
Learning25
Posts: 11
Joined: Wed Sep 28, 2022 9:59 pm

Re: LibreOffice unable to save some documents due to file being locked by another user

Post by Learning25 »

In comparing the Properties > Details for the newly created Libre Writer file and the Details of the original file Libre Writer cannot save to, I do NOT see any significant difference. Besides some differences in stats like word count, character count, etc., the only other difference I notice is that the MS Word file has certain fields in Details that can be edited, which are Version Number, Company, Manager, Content Status, and even the Content type field. The newly created Libre Writer file on the other hand does not have any editable fields.

As an experiment in the Properties > Details tab of the original "Problem File" I selected "Remove Properties and Personal Information" > "Create a copy with all possible properties removed." I opened this copy in Libre Writer, but it still behaves the same as the original (i.e. cannot save any edits to the file).
LibreOffice 7.4 with Windows 10 Pro
User avatar
Hagar Delest
Moderator
Posts: 32653
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: LibreOffice unable to save some documents due to file being locked by another user

Post by Hagar Delest »

It is as if Cryptomator added a kind of stamp to the files, maybe a specific field that acts as a tracker to check if the file came from a vault. Either it is lost when opened with MS Office, or MS Office has a special knowledge of how it works and removes it.
You should ask the Cryptomator support to see how it works exactly in case of interruption.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
Learning25
Posts: 11
Joined: Wed Sep 28, 2022 9:59 pm

Re: LibreOffice unable to save some documents due to file being locked by another user

Post by Learning25 »

Will do. I'll let you know what I find out.
LibreOffice 7.4 with Windows 10 Pro
Learning25
Posts: 11
Joined: Wed Sep 28, 2022 9:59 pm

Re: LibreOffice unable to save some documents due to file being locked by another user

Post by Learning25 »

Well, before I got around to posting on the Cryptomator forum I tried something else: I installed LibreOffice on my desktop and I can edit and save the "problem file" with Libre Writer just fine. So it appears something got corrupted with the Libre Writer on my laptop when Windows restarted. But there must also be some sort of anomaly in the file otherwise it doesn't explain why Libre Writer on the laptop is able to edit and save files that were not open at the time of the Windows restart.
LibreOffice 7.4 with Windows 10 Pro
User avatar
Hagar Delest
Moderator
Posts: 32653
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: LibreOffice unable to save some documents due to file being locked by another user

Post by Hagar Delest »

There may be a link between the file and the application. Maybe Cryptomator stores a hash of the application that was used. If you install another version or a portable version on your laptop, does it work better?
Is the vault in the cloud or is it on your laptop only? If the file you opened on your desktop was not in the vault but outside, I guess there is no reason it should be locked.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
User avatar
MrProgrammer
Moderator
Posts: 4903
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: LibreOffice unable to save some documents due to file being locked by another user

Post by MrProgrammer »

Learning25 wrote: Wed Sep 28, 2022 10:17 pm I have tried every recommendation I have come across on this forum and still haven't solved the problem.
LibreOffice always locks documents during the time they are open to ensure no other LibreOffice process edits them concurrently. But the lock only affects LibreOffice. You can still destroy the documents using Word. Perhaps the vault is broken in such a way that only documents which were locked by LibreOffice are affected. Create a new Cryptomator vault. Using your operating system, not LibreOffice, copy every document in your old vault to the new one. Typically this is done in a few seconds with Select All, Copy, Paste. Close both vaults. Open the new one. Try to use documents in it with LibreOffice. If this is successful, delete the old vault after you are sure all is well.

Do a web search for: Error saving the document. The file is locked by another user. Cryptomator
You will find that both MS Office and Cryptomator can experience this problem on files which LibreOffice did not create.

If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the subject field. Select the green checkmark icon at the same time.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
Learning25
Posts: 11
Joined: Wed Sep 28, 2022 9:59 pm

Re: LibreOffice unable to save some documents due to file being locked by another user

Post by Learning25 »

Thanks, but there is no way I am creating a new vault and transferring all my contents over to it just to get LibreOffice to open a few files. This is not a solution to the problem because the next time Windows does an update shutdown/restart the same issue will likely happen with whatever files are opened in LibreOffice at that time, and then I will again have to create a new vault to solve the problem? No thank you.

The Cryptomator vault is online. If it's a vault issue why am I able to edit and save the "problem files" without issue on LibreOffice installed on another PC?

I'm going to try uninstalling LibreOffice from the PC that LibreOffice is experiencing the file issue with and reinstall it and see what happens.
LibreOffice 7.4 with Windows 10 Pro
User avatar
Hagar Delest
Moderator
Posts: 32653
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: LibreOffice unable to save some documents due to file being locked by another user

Post by Hagar Delest »

Try to reinstall a different version. It may be linked to the file signature of the executable. Not a satisfactory workaround if it works but it would at least help to find the smoking gun.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
Learning25
Posts: 11
Joined: Wed Sep 28, 2022 9:59 pm

Re: LibreOffice unable to save some documents due to file being locked by another user

Post by Learning25 »

I uninstalled LibreOffice 7.4.1 and installed 7.3.6 but when I attempt to edit and save a "problem file" I still get the same error: "Error saving the document [filename]. The file [filepath/filename] is locked by another user. Currently, another write access to this file cannot be granted." It makes no sense. About to give up and just stick with MS Office.
LibreOffice 7.4 with Windows 10 Pro
User avatar
Hagar Delest
Moderator
Posts: 32653
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: LibreOffice unable to save some documents due to file being locked by another user

Post by Hagar Delest »

I fear you are barking the wrong tree. If you have reset the profile, then the application has no way to see that the file is already in use, except if there is still a .lock file in the vault folder.
It is more likely a Cryptomator issue. What have they said about that?
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
Post Reply