[Solved] Document file is locked for editing by Unknown user

Issues with installing under all versions of MS Windows
Locked
NetRyder
Posts: 1
Joined: Tue Sep 22, 2020 1:36 pm

[Solved] Document file is locked for editing by Unknown user

Post by NetRyder »

Hi all,

I'm new here. Yes, i've seen & read several posts having the same error message as me. But, none solved my issue. The thing is, my ods file was open when there was a power cut. Now, each i try to open my file, the window "text import" pops up. I've selected character set unicode, unicode UTF-7 & 8 and document in use (Document file is locked for editing by : Unknown user) window pops up. Now, i chose open read-only & open copy, both open a blank sheet.

I have tried deleting the lock file with no success. It's a stand alone PC, not connected to the internet, so i don't have antivirus or anti-ransomware installed. I also copied the ods to my laptop (Win 10 & OO 4.1.5), but i still open a blank sheet.

I hope you can help me restore my file. Thank you in advance.

NetRyder
Last edited by MrProgrammer on Wed Sep 30, 2020 5:08 pm, edited 1 time in total.
Reason: Tagged ✓ [Solved]
Open Office 3.2 & Windows 7
User avatar
robleyd
Moderator
Posts: 5456
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: Document file is locked for editing by : Unknown user

Post by robleyd »

Please see the answer in viewtopic.php?f=5&t=103076 - it will apply to your situation as well.
Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 25.8.2.2; SlackBuild for 25.8.2 by Eric Hameleers
---------------------
Tech support noun: A person who does precision guesswork based on unreliable data provided by those of questionable knowledge.
MattD76
Posts: 4
Joined: Sun Oct 04, 2020 4:46 pm

Re: [Solved] Document file is locked for editing by Unknown

Post by MattD76 »

I am having a similar problem when opening Documents I have created in OpenOffice. I have tried to open several documents today and keep getting a message saying the document is "locked for editing by" followed by my name then a date and time in brackets.

I am the only user of these documents and I am the one who created them. I have no idea how to "lock" anything on Open Office so how has this occurred?

I can open copies and then save them with slightly altered names, and in one case the same name but in a new location.

How do I fix this?

I am not technical so please provide answers in clear steps and without passing me to other boards or websites. All I need to know is how to stop Open Office doing this as I have not done anything.

Many thanks in advance

Matt
OpenOffice 4.1.7 on Windows 10
User avatar
RoryOF
Moderator
Posts: 35104
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Solved] Document file is locked for editing by Unknown

Post by RoryOF »

With OpenOffice closed, enable viewing of hidden files; Google for how to do this: as I haven't used Windows in more than ten years I cannot tell you for certain how to do this on modern version of Windows. Look in the folder in which you have saved the file in question, and delete any file with a name similar to

Code: Select all

.~lock.Filename.odt#
Where Filename.odt is replaced by your filename and extension.

Also look in the root of your OpenOffice profile - details are given in
[Tutorial] The OpenOffice User Profile
and delete any file named

Code: Select all

.lock
beside the User folder.

This may have happened because you closed your computer or powered down without allowing the few seconds for the OO housekeeping to be written to disk, or you may have had a computer or program crash.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.5 LTS
MattD76
Posts: 4
Joined: Sun Oct 04, 2020 4:46 pm

Re: [Solved] Document file is locked for editing by Unknown

Post by MattD76 »

RoryOF wrote:With OpenOffice closed, enable viewing of hidden files; Google for how to do this: as I haven't used Windows in more than ten years I cannot tell you for certain how to do this on modern version of Windows. Look in the folder in which you have saved the file in question, and delete any file with a name similar to

Code: Select all

.~lock.Filename.odt#
Where Filename.odt is replaced by your filename and extension.

Also look in the root of your OpenOffice profile - details are given in
[Tutorial] The OpenOffice User Profile
and delete any file named

Code: Select all

.lock
beside the User folder.

This may have happened because you closed your computer or powered down without allowing the few seconds for the OO housekeeping to be written to disk, or you may have had a computer or program crash.
Hi

Thanks for the quick reply. I am afraid I know nothing about the technical aspects of this and don't quite understand what you are saying. I have nothing called "lock.Filename.odt" or at least nothing that I can see anyhow. I also have no files with the same name, except for a few where I add "version 2" etc on after the main name.

Oddly I can open some files so it isn't affecting all, but there seems to be no info on how to fix it in the "help" section of OpenOffice [there is a section for "locked documents" but it is empty!].

I will have a look at your suggestions tomorrow and see if I can find. One thing I want to check is that I am not deleting the files. I want to open these not delete them.

Two questions though

1] How do I find any file named "-lock.Filename.odt" ? Do I simply put "lock" before the filename I want, for example "lock.Cooking Ideas.odt"

Also can I just search for all records with that "lock" bit at the start? It will make life so much easier.

2] How do I get that little symbol before the "lock" lol!? I know it's with the shift key but I can't remember where this symbol is as I don't use it lol!

Of course my other option is to print the document out and re-type it but I shouldn't have to do that.

Anyhow many thank again and I will take a proper look at your suggestions tomorrow.

Matt
OpenOffice 4.1.7 on Windows 10
MattD76
Posts: 4
Joined: Sun Oct 04, 2020 4:46 pm

Re: [Solved] Document file is locked for editing by Unknown

Post by MattD76 »

Hi again

I just googled "enable viewing of hidden files" as suggested and found a very clear set of instructions on how to do it. I have followed the instructions and very quickly saw the "locked" files.

The great news is that after deleting those I could access the original files which is brilliant. I have tried this with 5 files and all are now accessible. I will do any others tomorrow.

Many thanks again for the suggestion which has really helped.

Best Wishes

Matt :D :D :D
OpenOffice 4.1.7 on Windows 10
Bill
Volunteer
Posts: 8952
Joined: Sat Nov 24, 2007 6:48 am

Re: [Solved] Document file is locked for editing by Unknown

Post by Bill »

MattD76 wrote:I just googled "enable viewing of hidden files" as suggested and found a very clear set of instructions on how to do it. I have followed the instructions and very quickly saw the "locked" files.
That's not quite right. The hidden files are not "locked". They are the locks. The non-hidden file you want to open is "locked". Think of a locked door. It can't be opened, but if the lock is removed from the door, then it is no longer locked and can be opened.
AOO 4.1.14 on Ubuntu MATE 22.04
MattD76
Posts: 4
Joined: Sun Oct 04, 2020 4:46 pm

Re: [Solved] Document file is locked for editing by Unknown

Post by MattD76 »

Bill wrote:
MattD76 wrote:I just googled "enable viewing of hidden files" as suggested and found a very clear set of instructions on how to do it. I have followed the instructions and very quickly saw the "locked" files.
That's not quite right. The hidden files are not "locked". They are the locks. The non-hidden file you want to open is "locked". Think of a locked door. It can't be opened, but if the lock is removed from the door, then it is no longer locked and can be opened.
Hi

I think I follow what you say [I'm not really a techy person]. The "locks" on the documents aren't showing up but by putting a tick on "hidden items" in the file manager I see both versions of the document. There is the main version, and the "locked" one which is technically the lock to the document. Delete that and I can open the main document.

I have been deleting any documents with "lock" at the start and so far I have now been able to open [or unlock] the documents I want to see. I will just have to remember to do this on my other laptop as well lol!

Is there a way to prevent documents locking at all?
OpenOffice 4.1.7 on Windows 10
User avatar
RoryOF
Moderator
Posts: 35104
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Solved] Document file is locked for editing by Unknown

Post by RoryOF »

Better to leave the lock files be made. If they are remaining, either your computer is very unstable and crashing, or your method of working with OpenOffice needs revision. It is best not to allow computer sleep/hibernate with an OpenOffice file open. One should always /File /Close a file, then a few seconds later (i.e. not instantly) /File Exit OpenOffice, then power down computer using Shutdown on the Start button.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.5 LTS
Bill
Volunteer
Posts: 8952
Joined: Sat Nov 24, 2007 6:48 am

Re: [Solved] Document file is locked for editing by Unknown

Post by Bill »

MattD76 wrote:I think I follow what you say [I'm not really a techy person]. The "locks" on the documents aren't showing up but by putting a tick on "hidden items" in the file manager I see both versions of the document. There is the main version, and the "locked" one which is technically the lock to the document. Delete that and I can open the main document.
No, there are not two versions of the document. The "locked" version IS the main version. When a user opens a document file, OpenOffice creates a lock file that contains the name of the user, the name of the computer, the date and the time when the user opened the document file and the location of the user's user profile. No part of the document file is in the lock file.
MattD76 wrote:I have been deleting any documents with "lock" at the start and so far I have now been able to open [or unlock] the documents I want to see. I will just have to remember to do this on my other laptop as well lol!
If you're transferring documents between two different computers, and the document files haven't been properly closed, then you may be transferring lock files as well. That will cause problems when the document files are opened on the second computer if the user names or the computer names are different.
MattD76 wrote:Is there a way to prevent documents locking at all?
There shouldn't be any need to prevent locking. Just close your documents properly and the lock files will be deleted automatically.
AOO 4.1.14 on Ubuntu MATE 22.04
Locked