Ask Your Question


asked 2015-06-15 23:00:44 +0100

herry.susanto.16 gravatar image

updated 2015-08-25 18:00:32 +0100

Alex Kemp gravatar image

I found ~lock.filename.odt# as one of my files. I did not see it in my documents folder. I realized that I have it when I found Spideroak tried to backup the file. Can somebody explain, what does it mean? Why I couldn't find it in documents folder? Will it affect the original file?

I'm using LO 4.4.3 and Ubuntu Gnome as my OS.

edit retag flag offensive close merge delete

4 Answers

Sort by » oldest newest most voted

answered 2015-06-16 22:59:37 +0100

peterwt gravatar image

The lock file is created when a document is opened and normally deleted when the document is closed. It's purpose is in a multi user environment to prevent more than one user to edit a document, which would create a problem. The first user to open the file will be able to edit the document but any subsequent users who open the document will be in read only mode.

There are times when the lock file may not be deleted - if AO or the OS lock up. In this case the file can only be opened in read only mode. The lock file needs to be deleted to get editing mode back.

Did you have the document open when you were backing up so that the lock file would be there? If not try to open the document now. If the lock file is there you will not be able to edit the file. The lock file will be in the same directory as the document. I don't know Ubuntu but in Windows it is a hidden file and you need to set Windows to show hidden files.

edit flag offensive delete link more


I'm still be able to edit the file. I found the lock file, and then deleted it. But, every time I saved the file, the lock file will appear again.

herry.susanto.16 gravatar imageherry.susanto.16 ( 2015-06-17 01:15:28 +0100 )edit

Is the lock file still there after allowing a pause on closing Writer? What happens with any other LO files you open?

peterwt gravatar imagepeterwt ( 2015-06-17 14:34:10 +0100 )edit

I just found out that it happens to my other odt files. When I close the file, the lock will disappear. It will be there if I save the file.

herry.susanto.16 gravatar imageherry.susanto.16 ( 2015-06-18 04:18:38 +0100 )edit

answered 2015-06-17 16:41:16 +0100

Alex Kemp gravatar image

updated 2015-06-17 22:09:14 +0100

Following on from petermau's answer, there is lock information kept within the ODT file as well as outside that file in the local lockfile + in the profile lockfile.

I'm currently editing a document under Debian 6.0 which I previously worked on under winXP. XP crashed whilst I was working on it & it was next visited under Debian. Attempting to open that file gave the following dialog message:

Document file 'html5.odt' is locked for editing by: Alex Kemp ( 25.05.2015 13:34 )

It then offered:

Open document read-only or open a copy of the document for editing.

I chose the second option & have been adding to it ever since. The one strangeness is that I can no longer revert the new file's name back to the old, as LO then thinks that I am attempting to open the old locked document.

The info given by the 2 Peters is perfectly accurate in my experience, and I thought to add some extra in the hope that it may be interesting.

Lock info:

Windows XP: local lockfile: .~lock.html5.odt#

local lockfile contents:

{username}, {computer-name}/{user-short-name}, {computer-name}{time-stamp}{profile-lockfile-location}

actual local lockfile contents (example, different file):

Alex Kemp,DAVID/Alex,david,25.05.2015 13:34,file:///C:/Documents%20and%20Settings/Alex/Application%20Data/OpenOffice/4;

Profile lockfilename: .lock

Profile lockfilename contents:

Time=Mon May 25 12:00:53 2015

Debian 6.0: local lockfile: .~lock.html5.0.odt#

local lockfile contents: (identical format to XP)

Profile lockfilename location: /home/alexK/.config/libreoffice/4/.lock

Profile lockfilename contents: (identical format to XP)

Final comment: the XP lockfiles detailed above were not mounted when I attempted to load the XP-originated file. Thus, the information within the dialog could only have come from the .odt file, not the lockfiles. Spookily, I obtained the dialog text above by re-attempting to load the locked XP-file. It's lockfile is open in my debian directory right now & has the identical content to the "actual local lockfile" quoted above, including Windows folder.

edit flag offensive delete link more


Lock file contents under Windows - "Author Name,Computername/Username,ComputerName,Date and Time,file:///C:/Users/Username/AppData/Roaming/LibreOffice/4;" There is another lock file pointed to by file contains [Lockdata] User=Computername/Username Host=Computername Stamp=08D31B1C8FAF63DCAF74D51625900D14 Time=Wed Jun 17 18:26:44 2015 IPCServer=true File name .lock So its more complicated.

peterwt gravatar imagepeterwt ( 2015-06-17 19:46:41 +0100 )edit

answered 2018-06-06 18:24:07 +0100

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I have same type of file with the pdf, is it the same? lock.filename.pdf# Windows 10, libre office

edit flag offensive delete link more

answered 2015-06-17 11:10:57 +0100

petermau gravatar image

Following on from PeterWT's answer, LibreO running on Ubuntu creates a hidden lock file, hence its name is actually .~lock.filename.odt# The first (.) indicates that it is a hidden file. The file will exist whilst you are actually editing the file, and will still be there when you save it. The lock file will disappear when you close the Writer window although the file manager may take a moment to reflect this change.

If the system shuts down whilst LibreO is running and the file is open, the lock file will likely still be there.

edit flag offensive delete link more


Will it affect the original file? I had tried to delete the lock file, but it is still there. As you said, every time I edit the file, the lock file will appear.

herry.susanto.16 gravatar imageherry.susanto.16 ( 2015-06-18 04:25:23 +0100 )edit
Login/Signup to Answer

Question Tools



Asked: 2015-06-15 23:00:44 +0100

Seen: 15,059 times

Last updated: Jun 06 '18