[SOLVED] LibreOffice Document is locked for editing by: Unknown User
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
LibreOffice Document is locked for editing by: Unknown User
I've posted this question on the ask.libreoffice.com forum, but they seem to be focused on Windows and are not helping much. I just upgraded to Alien Bob's Libreoffice 7.2.0 from 6.4.6 on Slackware-Current; not sure the upgrade bit matters in this case. While creating a document my desktop crashed. After restarting and logging back in I could not edit/save that document. I kept getting the message “Document is locked for editing by: Unknown User”. Saving or copying to a different directory didn’t help. If I told Writer to “Open Copy”, I could edit and save that copy to a different file name, but if I tried to edit that new document I had the same problem. This problem has persisted through re-logins and power downs.
Pretty much all of the “solutions” I have read about are related to Windows and removing .lock files. This is Linux, not Windows. There are no .lock files in any of the directories to which I have copied these documents. I had to complete editing my document in MS Word.
The LibreOffice forum suggested I re-create the profile, which I did resetting to factory. Didn't help. Does anyone have any idea how LibreOffice detects a locked file?
I also restored the profile to before I upgraded or created the document(s). Same error.
Last edited by mfoley; 08-31-2021 at 10:01 AM.
Reason: more info
I've already spent too much time on this. I've reverted back to version 6.4.6.2 and now I can open these supposedly locked files without problem. There must be something wrong with the 7.2.0 version.
I had this same issue with LibreOffice on Win10 accessing Samba shares hosted with Ubuntu 20.04. To access the network share from two separate machines I have different users created on the Linux machine (let's just say user1 and user2). When I created the file and directory containing the .odt file, I used user1, but when I tried to access later using user2 from Win10 it gave me the "Document is locked for editing by: Unknown User" message.
The fix in this case was to run "sudo chown -R user2:user2 *" in the directory containing my Samba share on the Ubuntu machine. Since user2 will be accessing those files from now on this worked fine, but adding proper groups in your samba config for a network share might fix the issue. When logged in with one user and writing folders/files samba configuration determines what happens on the filesystem.
So, in my case this was a red-herring issue. The error message is misleading because the file was not actually locked, but the Samba file ownership was causing the issue.
Just want to also emphasize that the directory containing the .odt file was also owned by user1 and perhaps this was the issue more-so than the file ownership.
Thanks for your detailed reply. The file was on a Samba share, although accessed by Linux, not Windows, and I did check and double-check file ownership and permissions. I even copied the file to different directories, sometimes changing the name. Nothing worked for me until I reverted to a previous version of LibreOffice. When Alien Bob posts a new version, I give it a try.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.