Bug 84873

Summary: Commandline parameter "--nolockcheck" doesn't work for read-only shared folder.
Product: LibreOffice Reporter: Draga <draga>
Component: LibreofficeAssignee: Not Assigned <libreoffice-bugs>
Status: UNCONFIRMED --- QA Contact:
Severity: normal    
Priority: medium CC: todventtu
Version: 4.3.2.2 release   
Hardware: Other   
OS: Windows (All)   
Whiteboard:
i915 platform: i915 features:

Description Draga 2014-10-10 12:57:58 UTC
I have readonly shared folder (WinServer) with files: odt, ods, doc, xls.
When I open files, I get a dialog box ("The document is already in use") with a choice: 
----------- my translate to english -------------
Document file «test.odt» locked for editing:
Unknown user
Open the document in read-only mode or open the copy of the document to make changes..
-------------------------------------------------

If I copy this file to a local folder and set ReadOnly attribute, the file is opened in read-only mode directly.

In OpenOffice commandline parameter "--nolockcheck" disable dialog box. How can I do this in LibO.
Comment 1 ulkitz 2014-12-04 20:12:20 UTC
I suppose the dialog box appears because LO isn't able to create the lock-file for your document, as the folder is readonly. When you copy it to a local folder and set its read-only flag, the document itself (not the directory) is readonly. 

The nolockcheck-parameter is described as "--nolockcheck  don't check for remote instances using the installation", so it's not about checking the lock of a document, but the lock of the LO installation. The different behaviour of OOo and Lo is a result of bug 71005.
Comment 2 Draga 2014-12-05 06:46:07 UTC
Confirm it.
I created local folder. Copied into folder document. Made folder as "read-only" by NTFS. Document opens as read-only with dialog box.

The interesting behavior (1).
a)If I set read-only flag for file. Then "read-only" by NTFS for local folder. Now document opens as read-only WITHOUT dialog box.
b)I unset read-only flag for file ("read-only" folder). Now document opens as read-only WITH dialog box.

May be solution for me is option (a)? NO.
I can not set read-only flag for all files in network shared folder. Because folder is "read-only" for most users, but some users have full access for this folder.
But for some it will be a solution, not for me.


The interesting behavior (2).
Local folder with fullaccess permissions.
a)I set read-only flag for file. The document opens as "read-only" WITHOUT dialog box.
b)I unset read-only flag for file. Take off NTFS permission "write" for file. Now document opens as "read-only" WITH dialog box. Folder has fullaccess permissions (nothing not interfere to create the lock-file).


Please, I ask option in "Load/Save | General": Open as "read-only" from read-only folder.
Algorithm: if lock-file not exist and if there are no rights for create lock-file, open file as "read-only".
Comment 3 ulkitz 2014-12-05 19:06:28 UTC
In current master, the problem is solved: 
When the lockfile cannot be created, the document (writable) is opened normally, and if two users access and change the document, the second one gets a warning message.
Comment 4 Beluga 2014-12-16 14:22:49 UTC
Can the original reporter please test with a recent master build (installs separately): http://dev-builds.libreoffice.org/daily/master/Win-x86@39/
Comment 5 Draga 2014-12-19 11:20:01 UTC
http://dev-builds.libreoffice.org/daily/master/Win-x86@39/2014-12-12_01.58.46/master~2014-12-12_01.58.46_LibreOfficeDev_4.5.0.0.alpha0_Win_x86.msi

Local folder as "read-only" by NTFS. Document opens as read-only with dialog box "Document in Use".

Read-only shared folder (WinServer). Dialog box.
Comment 6 Beluga 2014-12-20 12:27:24 UTC
Thanks for the testing. Setting back to UNCONFIRMED as we need another confirmation.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.