Bug 101409 - FILEOPEN lock status being incorrectly (and dangerously) reported
Summary: FILEOPEN lock status being incorrectly (and dangerously) reported
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
(earliest affected) release
Hardware: All All
: medium normal
Assignee: Not Assigned
Depends on:
Blocks: Network File-Lock
  Show dependency treegraph
Reported: 2016-08-09 11:35 UTC by Nigel Arnot
Modified: 2020-02-04 12:12 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:

Screenshot of the document-locked dialog (25.33 KB, image/png)
2016-08-09 11:35 UTC, Nigel Arnot
Document in Use (LibO (13.95 KB, image/jpeg)
2016-10-01 16:23 UTC, Eugene Kin
Document in Use (LibO (15.78 KB, image/jpeg)
2016-10-01 16:25 UTC, Eugene Kin

Note You need to log in before you can comment on or make changes to this bug.
Description Nigel Arnot 2016-08-09 11:35:37 UTC
Created attachment 126690 [details]
Screenshot of the document-locked dialog

A document test.ods is present in an NFS v3 shared directory. User carmen on client system apollo.silson.com opens the file for editing. The lock file is created and contains the following text:

$ cat /silson/allshare2/SilsonR\&D/.~lock.test.ods# 
,carmen,apollo.silson.com,09.08.2016 11:33,file:///home/carmen/.config/libreoffice/4;

(which also confirms that user nigel has read access to the lock file)

Now user nigel on atlas.silson.com attempts to open the (locked) file. The lock is detected, but the dialog incorrectly reports the problem as follows (my enphasis with **text**) (see attachment for a screenshot of the dialog)


Document file 'test.ods' is locked for editing **by yourself** on a **different system** since 09.08.2016 11:33

Open document read-only, or ignore own file locking and open the document for editing.

Buttons:Open Read-only    Button:Open   Button:Cancel


From the contents of the lock file it is clear that LibreOffice ought to be able to correctly report "... is locked for editing by **user carmen** **on host apollo.silson.com **  ..." On our organisation this lets us find or phone the user who has the file open and ask them whether they can close it. 

Further, in this situation the option to ignore the lock and open the file (not read-only) is extremely dangerous, leading to data loss if/when a naive user takes this choice.

This is a regression. It worked correctly using Libreoffice 4 (not sure which version: the one which came with Fedora 20 which is now eol.

A similar problem occurs when the file is opened via Samba/CIFS from an instance of LibreOffice running on a Windows PC.

The same bug is present in Libreoffice release 

Further information on file ownership / protection, if relevant. Both nigel and carmen are members of group silson. Collaboration takes place using shared group write access. There are no acls affecting nigel or carmen. 

[atlas: ~]$ ls -l /silson/allshare2/SilsonR\&D/.~lock.test.ods# 
-rw-rw-r--+ 1 carmen silson 85 Aug  9 11:33 '/silson/allshare2/SilsonR&D/.~lock.test.ods#'
[atlas: ~]$ ls -l /silson/allshare2/SilsonR\&D/test.ods 
-rwxrwxr--+ 1 nigel silson 22899 Aug  8 13:30 '/silson/allshare2/SilsonR&D/test.ods'
Comment 1 Eugene Kin 2016-10-01 16:23:43 UTC
Created attachment 127764 [details]
Document in Use (LibO
Comment 2 Eugene Kin 2016-10-01 16:25:01 UTC
Created attachment 127765 [details]
Document in Use (LibO
Comment 3 Eugene Kin 2016-10-01 16:28:47 UTC
Can confirm this on Windows 7/Server 2008 R2.
But only for LibO 5.2 branch since
Comment 4 Robert Großkopf 2016-10-19 13:56:57 UTC
I have set this to component "LibreOffice", because it isn't a special Calc-problem. Other users in German reported the same problem with Writer.

Tested a little bit with Linux. 
Created as one user a document.
Let this document open.
Switch to another user.
Try to open the document here, too.
Message appears, that the first user has opens the document.

I couldn't confirm the bug for this situation. It's a special network-bug.

My system: OpenSUSE 42.1 64bit rpm Linux, LO
Comment 5 Eugene Kin 2016-10-20 17:00:20 UTC
Disagree about network bug.

Steps to reproduce in multi-session Windows 7/Server 2008 R2 environment:

1. Login as User1, open document on local disk
2. Change user/Login as User2, try to open
3. With pre-5.2 versions you get correct dialog (locked by User1)
4. With 5.2 version you get buggy "locked by yourself"

As mentioned in comment 1 content of lock file is the same in all versions.
Comment 6 Eugene Kin 2016-10-21 12:58:57 UTC
LibO dialog shows correct information.
So, in my case problem reproducible with LibO 5.2 only.
Comment 7 Eugene Kin 2016-10-28 08:09:00 UTC
Seems to be problem solved in LibO
Comment 8 Nigel Arnot 2017-02-02 15:09:13 UTC
Mostly fixed (and

The dangerous bit is mercifully gone.

What isn't fixed: only the username locking the file is displayed in the dialog, and not the hostname on which the file is locked. The hostname is there in the lockfile, and it should be presented to the user. The username may not be helpful if the user in question has gone home or on holiday, whereas the hostname lets one find the system which is causing the problem and deal with it without contacting the user.
Comment 9 QA Administrators 2018-02-03 03:32:28 UTC Comment hidden (obsolete)
Comment 10 QA Administrators 2020-02-04 03:30:59 UTC Comment hidden (obsolete)
Comment 11 Nigel Arnot 2020-02-04 11:54:36 UTC
Now using version

Comment 8 still applies

The rest is fixed, so marking this RESOLVED. I'll raise comment 8 as a separate bug of lesser importance.