[Solved] Locked for Editing
[Solved] Locked for Editing
All of a sudden, many if not all my files are "locked for Editing". As far as I know, I did nothing....I am a very inexperienced computer user and I cant seem to figure out how to fix this. I have uninstalled OO and nothing changed. I need a really "simple" answer "well explained" if possible. I may have to go to another application or purchase the MS Office suite....yikes....
Last edited by Hagar Delest on Fri Jan 22, 2021 6:28 pm, edited 1 time in total.
Reason: tagged solved.
Reason: tagged solved.
OpenOffice 4.1.8 on windows 10
Re: Locked for Editing
OpenOffice is not closing files correctly for some reason. When OpenOffice opens a file, it writes a tiny temporary file that records which file is being edited. This temporary file should be removed when the original file is closed. If it is not removed, then the next time you try to open the original file, OpenOffice will think it is being edited by someone and display the "file locked for editing" message.
The first thing to do is to delete all of the temporary files. They have names that start with .~lock. and they are normally hidden from view. You should open the folder that contains the file you are trying to edit, set it to display hidden files and then delete all of the files whose name starts with .~lock. To show the hidden files, click on the View tab of the window displaying the folder contents and click on the box labeled Hidden Items. I have highlighted that box in red in the image below. You can also see at the bottom of the image a file named .~lock.dummy.xlsx#. I have a file named dummy.xlsx open and that is its temporary file.
After cleaning up the lock files, you should be able to edit your files. You should then consider why these temporary files are not being deleted. One possibility is that you are closing the file and then very quickly shutting down the computer. If so, give OpenOffice a few seconds to do its internal clean up. another possibility is that OpenOffice is crashing a lot. Have you had that problem?
The first thing to do is to delete all of the temporary files. They have names that start with .~lock. and they are normally hidden from view. You should open the folder that contains the file you are trying to edit, set it to display hidden files and then delete all of the files whose name starts with .~lock. To show the hidden files, click on the View tab of the window displaying the folder contents and click on the box labeled Hidden Items. I have highlighted that box in red in the image below. You can also see at the bottom of the image a file named .~lock.dummy.xlsx#. I have a file named dummy.xlsx open and that is its temporary file.
After cleaning up the lock files, you should be able to edit your files. You should then consider why these temporary files are not being deleted. One possibility is that you are closing the file and then very quickly shutting down the computer. If so, give OpenOffice a few seconds to do its internal clean up. another possibility is that OpenOffice is crashing a lot. Have you had that problem?
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Re: Locked for Editing
I opened my 'documents' folder, the 'hidden items' box is checked. There are no files like what you mention.
OpenOffice 4.1.8 on windows 10
Re: Locked for Editing
Try to make a new document and save it in the same folder as your other documents. While it is open, do you see the .~lock file? If you close it, does the .~lock file disappear?
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Re: Locked for Editing
Yes, i see a file like that.....Would post screen shot if I could figure that out.......I closed the file and when I open the documents folder, the 'locked' file shows up
OpenOffice 4.1.8 on windows 10
Re: Locked for Editing
Ooops, when I closed the file, the 'locked' file does not show up in the list....when I try to open the file, I get the locked message....grrrrrr
OpenOffice 4.1.8 on windows 10
Re: Locked for Editing
Are you working to the local hard drive, or to a USB or networked drive, or to the cloud?
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Re: Locked for Editing
Try deleting or renaming your OpenOffice User Profile. Details of how to do this are set out on
Resetting the user profile
If you have custom dictionaries or extensions installed, renaming is best -user.old is a good choice. Otherwise, just delete it.
On next start of OpenOffice you will be prompted for name and initials. If you are not, you got the renaming or deletion process wrong.
Resetting the user profile
If you have custom dictionaries or extensions installed, renaming is best -user.old is a good choice. Otherwise, just delete it.
On next start of OpenOffice you will be prompted for name and initials. If you are not, you got the renaming or deletion process wrong.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Re: Locked for Editing
Just to confirm: when you deleted or renamed your OpenOffice user profile, you were prompted for your name and initials on next start of OpenOffice?
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Re: Locked for Editing
In my experience, the message does not appear if the same user tries to open the original file. It does appear when a different user tries to open the file. The message that appears is titled "Document in Use" The full message is:FJCC wrote:When OpenOffice opens a file, it writes a tiny temporary file that records which file is being edited. This temporary file should be removed when the original file is closed. If it is not removed, then the next time you try to open the original file, OpenOffice will think it is being edited by someone and display the "file locked for editing" message.
Code: Select all
"Document file '<file name> is locked for editing by:
<account username> (<date & time)
Open document read-only or open a copy of the document for editing."
AOO 4.1.14 on Ubuntu MATE 22.04
Re: Locked for Editing
I thought that too as many of my forum replies will attestFJCC wrote:When OpenOffice opens a file [fred.odt], it writes a tiny temporary file [.~lock.fred.odt#]that records which file is being edited. This temporary file should be removed when the original file is closed. If it is not removed, then the next time you try to open the original file, OpenOffice will think it is being edited by someone and display the "file locked for editing" message.
I did a test. I opened fred.odt and moved .~lock.fred.odt# out of the folder. I closed fred.odt and put .~lock.fred.odt# back into the folder. I then opened fred.odt.
I was expecting that the presence of .~lock.fred.odt# would cause AOO 4.1.8 to complain that fred.odt was open for editing and AOO would ask if I wanted to edit a copy. I was surprised that AOO said nothing, allowed me to edit fred.odt, and then allowed me to save it!
So how does AOO check if a file is open and being edited by another user? It must be Bill's suggestion that it only works if another user on the PC tries to open it.
LO 6.4.4.2, Windows 10 Home 64 bit
See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.
Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.
Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
Re: Locked for Editing
You have to log on as a different User, John. I suggest you edit the lock file (plain text editor will do), and change your name and logon name to something else. Save the lock file. Then Open the main file as you; and it will pick up tat the lock file exists and inform you that the main files is locked for editing by whoever you changed the name/user to, suggesting it be opened read-only or as a copy.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Re: Locked for Editing
Rory
I have just done the test and I can confirm that. I logged John out of Windows and logged back in as my Test user. I then got the locked for editing message.
.~lock.fred.odt# contains
where both occurrences of John must be my Windows name John, and not my AOO name.
I have been wrong all these years - you could blow me down with a feather
I have just done the test and I can confirm that. I logged John out of Windows and logged back in as my Test user. I then got the locked for editing message.
.~lock.fred.odt# contains
Code: Select all
John ,Lounge-PC/John,LOUNGE-PC,21.01.2021 20:01,file:///C:/Users/John/AppData/Roaming/OpenOffice/4;
I have been wrong all these years - you could blow me down with a feather
LO 6.4.4.2, Windows 10 Home 64 bit
See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.
Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.
Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
Re: Locked for Editing
Even Homer nods!John_Ha wrote:Rory
I have been wrong all these years - you could blow me down with a feather
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Re: Locked for Editing
Do the same test again, but after pasting the lock file back in the folder, open the lock file with a text editor and change the account username in the lock file and save it, then try to open the original file. You should then get the message saying that the file locked for editing by the user whose account username you entered in the lock file. As a third test, leave the account username blank in the lock file before opening the original file. You should then get the message saying that the file is locked for editing by "unknown user". However, I don't know how an account could have no username. That's why I think "unknown user" in the message indicates an external problem, not a lock file problem.John_Ha wrote:I did a test. I opened fred.odt and moved .~lock.fred.odt# out of the folder. I closed fred.odt and put .~lock.fred.odt# back into the folder. I then opened fred.odt.
I was expecting that the presence of .~lock.fred.odt# would cause AOO 4.1.8 to complain that fred.odt was open for editing and AOO would ask if I wanted to edit a copy. I was surprised that AOO said nothing, allowed me to edit fred.odt, and then allowed me to save it!
So how does AOO check if a file is open and being edited by another user? It must be Bill's suggestion that it only works if another user on the PC tries to open it.
AOO 4.1.14 on Ubuntu MATE 22.04
Re: Locked for Editing
BillBill wrote:Do the same test again ...
That's exactly what happened. I edited it and changed both John above to, quelle surprise, Fred. On opening it I got the message below saying Fred was editing it.
When I changed only the first John to four spaces, it opened OK.
But when I changed both occurrences of John to four spaces I got the message below:
LO 6.4.4.2, Windows 10 Home 64 bit
See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.
Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.
Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
Re: Locked for Editing
The first "John" should be the full name that is entered in the AOO/LO user data. That can be checked by opening files after changing the full name to something unique. "John" that appears after the first comma should be the account name in the operating system. That can be checked by opening files in different user accounts. I don't know about "Lounge-PC/" that precedes the second "John". Nothing like that appears on my system. "LOUNGE-PC" that appears after the second comma should be the computer name in the operating system. That should be self-evident if the computer name is unique.John_Ha wrote:.~lock.fred.odt# contains
where both occurrences of John must be my Windows name John, and not my AOO name.Code: Select all
John ,Lounge-PC/John,LOUNGE-PC,21.01.2021 20:01,file:///C:/Users/John/AppData/Roaming/OpenOffice/4;
AOO 4.1.14 on Ubuntu MATE 22.04
Re: Locked for Editing
Thanks to everyone who tried to help me. I could not get AOO to work like it used to, so I have moved on to another package. Thanks Again....So Long....
OpenOffice 4.1.8 on windows 10
Re: [Solved] Locked for Editing
Earlier you said that the lock files disappear when the original file is closed, so the problem is not getting AOO to work, it is getting your antivirus and ransomware setup properly.
AOO 4.1.14 on Ubuntu MATE 22.04
Re: [Solved] Locked for Editing
This happens to me every time I get a new PC. It's pretty easy to just go to the parent folder and search for ~lock. Once the search is completed just highlight all of the files and permanently delete them.
OpenOffice 4.1.7 on Windows 7 Premium
Re: [Solved] Locked for Editing
One must be certain to delete _only_ the lock files, which have a unique character and are small, typically several hundred bytes, rather than the main files, which, if they are ODF format (OO's native formats) are about 6 KB or larger.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS