LibreOffice error "...insufficient user rights" in windows 10

Running LibreOffice 6.4 on windows 10 with all maintenance up to date.

When I try to open spreadsheets I created and saved as .odt or .xls or .xlsx I get an error message ending as in the question, and beginning with something about lock.

It happened several days ago when I was running LibreOffice 6.3. Since then I have looked for solutions with Google with no success, though many other reports. I uninstalled LibreOffice 6.3 and installed 6.4 with no help - same problem. I can open the files read-only but cannot change then nor save them.

Prior to the problem I had done little or nothing to my Windows 10 system, as I use an iPad for most of my computer access these days. Of course, Microsoft does install Windows 10 maintenance at its pleasure.

You seem to have no rights to create so-called lock files, which are hidden files having a name .~lock.<filename>#. This makes me to assume, that you are using some cloud service, NAS server etc. to store your files, which does not allow to create hidden files (files starting with a . are considered “hidden” in Windows).

To test, whether this is your issue - disable file locking on LibreOffice:

Go to Tools -> Options -> LibreOffice -> Advanced -> Button: Open Expert Configuration -> Search: UseLocking and set org.openoffice.Office.Common | Misc | UseLocking to false (Double click on the entry to change).

You may also had a crash at some point and now there a leftovers of such lock files. Try to search using File Explorer (aka Windows Explorer) for files `.~lock*` (may be you need to activate option *Show hidden files* in explorer) and delete all files with tha naming you found [Everything to be done, while LibreOffice is not running].

Thank you for your help, Opaque. I searched my entire C:\ drive for .~lock* using file explorer and also another search tool, but got no hits.

After that, I set Uselocking to false with the procedure you gave. That seems to have cured my problem. I can now Open, modify and save all the files I tried, and they included .ods, .odt, .doc, .doc, .docx, .xls, and ,xlsx. I also did save-as for some to be sure I could save with all of those types even with the original file having a different type.

I have 2 questions. (1) I know of nothing I might have done, so why did this suddenly begin to happen? (2) I assume LibreOffice has some reason for using the locking, so am I safe to continue using it with locking turned off?

Before I saw your answer, I had installed Apache’s OpenOffice product, and found it will not save a file as .docx nor .xlsx, though it will allow opening and modifying and saving as other types. I like Libre better and prefer to keep using it.

(1) I know of nothing I might have done, so why did this suddenly begin to happen?

You had installed OpenOffice and you installed LibreOffice 6.4.x - and that’s what you have done. Versions prior to LibreOffice 6 (incl. earlier LibreOffice versions, which had File Locking implemented) silently ignored the error, that a lock could not be created. Hence you never got aware of a problem existing ever since file lock was implemented. LibreOffice 6.x changed that and now you notice a problem.

(2) I assume LibreOffice has some reason for using the locking, so am I safe to continue using it with locking turned off?

There is a reason for that. File locking prevents a file being opened from different instances of LibreOffice more than once (as you noticed - you could open read-only) and this way file locking prevents conflicting changes to a file. This might not be a problem in your case, but it is definitely a problem in collaborative environments different people editing a doc.

To decide whether this is a problem depends on your environment, your working habits (start editing on a personal computer, leave the doc open, and continue editing on a another system / family members / co-workers intentional or inadvertently working on the same document). Since I don’t know anything about these circumstances I need to leave that decision up to you (From my personal perspective: I’d try to figure out, why the creation of lock files is not allowed on my personal system. The story would be different, if if were talking about some cloud storage, where your files are being stored.

Again, thanks for your quick reply, Opaque. But before LibreOffice had begun to give me those error messages, I had done nothing I was aware of that might have caused the error messages. The two installs were done after the problem occurred, and in an attempt to find a solution.

I would agree that a person in my own situation would be in little danger of multiple simultaneous updates to a file, and this,for me, is a good solution to what was a bad problem. Would you recommend it as a solution that should be put in an answer - with qualifications, of course?

File Explorer is unlikely to find any .~lock. files, even if it is the only thing in the folder and you can see it right in front of you. I did a search on my win10 PC and the server using Everything (but you might prefer a different tool) and I found several old ones from a while ago that I need to delete.

I do have some very recent ones that seem to have been created when I closed the file normally. This happened for only one PC, not the others and not today or yesterday. I normally reboot after installation of LO but maybe I didn’t do that on that particular PC so might have been installation not finished

In my case, file locking is a must - I am working in shared folder with multiple users. The only workaround for this issue is to run libre with admin rights:

  1. Go to libre bin folder: right-click on calc icon → “Open link location”. This will open something like C:\Program Files\LibreOffice\program
  2. Right-click on scalc.exe → Properties → Compatibility tab;
  3. Check checkbox “Run this program as an administrator”;
  4. Click OK.
  5. Essential: do the same for soffice.exe

Repeat this for sdraw.exe, swriter.exe and any other libre executables you use.

Now windows will throw UAC confirmation dialog when starting calc / writer, click yes. Libre will work correctly.

There is definitely a bug inside libre, or libre installer, which does not grand libre binaries R/W permissions to user folders. All other my programs have access to non system folders, only libre 6 / 7 don’t. I will not waste my time for filling an issue in issue tracker, because it probably won’t be reviewed, but maybe this post will help some users. I have lived with this workaround whole 2020, so this bug existed since v6.

My system:
Version: (x64) / LibreOffice Community
Build ID: 53d68d29d90fd16448721a60aad68c28ff0809f5
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL

Edit: Windows defender is completely off in my system, so do “Controlled folder access”:


Elevated privileges are wrong here. Probably this has something to do with AV blocking something. E.g., it could be related to this FAQ. But suggesting users to use software as admins is always bad.

There are plenty of users complaining. No other packages (like mspaint for example) are restricted to write to the folders where libre complains about lack of privileges, so this is a LO bug, which need to be fixed. I agree, this workaround is a serious security breaker, but this workaround should be seen to the users (not downvoted). Imo, users, who are using LO are more technical, usually understanding what administrator right are. Controlled folder access is turned off in my system, so as real-time scanning, but I have no luck of using file locking.

hi, i see this on my system (windows 10). i do not have a solution. i seem to recall that recently, i was able to delete the lock files, then save the file again over the old file. I am not certain if Libre Office was updated since then. I have (x86_64)

my system now does not seem to have the lock files anymore in the same directory. I did see some kind of lock file in the appdata directory. I don’t know if that is related. For me, it appears that i can save over the file as long as it is opened and i don’t restart my system, or something like that. However, I do not want to have to recreate the document (or copy it to a new document) every time that it locks.
It is a problematic bug. Is there any other workaround?

For me personally no other workaround than admin rights, using the latest version of LO 🥹. Also happy to hear if another workaround exist.

Sounds like Avast or AVG blocking access. See Using the Blocked & Allowed apps settings screen in Avast Antivirus | Avast