Bug 91179 - Calc files in "Share document" mode are "locked" if open over network (ssh/webdav)
Summary: Calc files in "Share document" mode are "locked" if open over network (ssh/we...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.7.2 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Network File-Lock
  Show dependency treegraph
 
Reported: 2015-05-09 00:18 UTC by Weiwu
Modified: 2019-02-19 21:24 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Weiwu 2015-05-09 00:18:25 UTC
Reproduce:

1. Make an empty Openoffice Calc document, enable Share Document (Tools -> Share Document), save it as .ods. Close LibreOffice.

2. Open the file to make sure it is still in Shared Document mode. Close Libreoffice.

3. Copy the file to a network server (in my case, WebDAV);

4. Open LibreOffice, File -> Open, on the upper right corner, choose "Servers", access the WebDAV server, and open that file.

5. The files open in Read Only mode.

Expected:

5. The files open, and still in "Shared Document" mode, just like step 2.

Notes:

----------
I tested it on latest LibreOfficeDev_5.0.0.0.alpha1_Linux_x86-64 and I re-tested it on LibreOffice 4.2.7, the version shipped with Ubuntu 14.04, same result.

On LibreOffice 4.2.7 I also tested accessing it through SSH, lest WebDAV is broken. This time, I got a dialog when opening the file over SSH in the last step. It stated the reason of read-only being 'file locked':

	Document file 'insurance%20investment.ods' is locked
	for editing by:

	Unknown User

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

I made sure in all my testing, the network directory (be it WebDAV or SSH) allows writing, so that ".~sharing.xxx.ods#" file can be created. The way I test it is to save a random file into the network directory through "File -> Save as".

More information about how Share Document mode and ".~sharing.xxx.ods#" file are expected to function can be found here:
http://doc.opensuse.org/documentation/html/openSUSE_113/opensuse-apps/cha.oo.calc.html

Quote:

	It is now possible to share a spreadsheet with other users. To do 
	so, click Tools+Share Document. In the dialog that appears, activate 
	the sharing mode and save the document. This creates a lock file 
	.~sharing.filename.ods# in the same directory to store the list of 
	users who are currently accessing the document. When a different 
	user, tux opens the file, he is informed about the sharing mode and 
	can make his changes to the file. When he wants to save his changes 
	(and the document has been modified by another user in the 
	meantime), a message appears. Upon saving the document, the changes 
	of both users will be merged.

	Access Permissions
	Note that all writers working on the shared document need writing 
	permission for both the shared file and the lock file.


Notice the use case: if a user wants to work on a document in Share Document mode, of course he intends to save it over the network. If Share Document only works when files are saved "locally", then it is limited to LAN, where with NFS/CIFS the user can map files to local directories. This is an extremely limited case. Most users wants to share across the Internet. Hence, this bug defeats the Share Document feature.
Comment 1 tommy27 2015-05-24 15:37:26 UTC
(In reply to zhangweiwu from comment #0)
> 
> .....
> 
> I tested it on latest LibreOfficeDev_5.0.0.0.alpha1_Linux_x86-64 and I
> re-tested it on LibreOffice 4.2.7, the version shipped with Ubuntu 14.04,
> same result.
> 
> ....

so I adjust version field to the first you reproduced the issue, which is 4.2.7
Comment 2 Weiwu 2015-05-25 00:29:54 UTC
I am confused: I first tested it on 5.x. When you mean "adjust to the first you reproduced the issue" Do you mean "adjust to the lowest version I reproduce the issue"? 

I am asking this because I have upgraded my Ubuntu to 15.04 in the interim, losing 4.2.7 on the way - I already don't have that old thing any more to answer retest request.

If you mean to find the earliest version that bare this problem I am pretty sure I can find even earlier versions, because I used it since openoffice and always have problem here and there with opening network files. This should be one of these.

Also - I tested this on Windows too, using 4.4, same problem. I changed platform back to All.
Comment 3 tommy27 2015-05-25 05:16:35 UTC
(In reply to zhangweiwu from comment #2)
> I am confused: I first tested it on 5.x. When you mean "adjust to the first
> you reproduced the issue" Do you mean "adjust to the lowest version I
> reproduce the issue"? 
> 

I mean the lowest which is 4.2.7
Comment 4 Weiwu 2015-08-10 11:43:37 UTC
We are currently working this way.

1. Mount webDAV as /mnt/dav using davfs2 (Linux). Do the same on Windows 8 because it comes with components to mount dav as a Drive Letter.

2. Use share mode on the mounted file system.

It worked for a few months and we don't have a confirmed case of losing data in share mode.
Comment 5 Buovjaga 2015-12-27 15:06:02 UTC
Repro with the example server from bug 96669.

Win 7 Pro 64-bit Version: 5.2.0.0.alpha0+
Build ID: a4764cfa80270f973da5861d0ddc28298bf16f4d
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2015-12-24_22:45:12
Locale: fi-FI (fi_FI)
Comment 6 Giuseppe Castagno (aka beppec56) 2015-12-28 15:47:30 UTC
@zhangweiwu

what WebDAV server are you using?
Comment 7 QA Administrators 2017-01-03 19:54:49 UTC
** Please read this message in its entirety before responding **

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present on a currently supported version of LibreOffice 
(5.1.6 or 5.2.3  https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the version of LibreOffice and 
your operating system, and any changes you see in the bug behavior
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave 
a short comment that includes your version of LibreOffice and Operating System

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3)

http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to "inherited from OOo";
4b. If the bug was not present in 3.3 - add "regression" to keyword


Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug-20170103