Bug 84873 - Commandline parameter "--nolockcheck" doesn't work for read-only shared folder.
Summary: Commandline parameter "--nolockcheck" doesn't work for read-only shared folder.
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 104652 (view as bug list)
Depends on:
Blocks: Commandline Network
  Show dependency treegraph
 
Reported: 2014-10-10 12:57 UTC by Draga
Modified: 2023-07-24 06:09 UTC (History)
3 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 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 Buovjaga 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 Buovjaga 2014-12-20 12:27:24 UTC
Thanks for the testing. Setting back to UNCONFIRMED as we need another confirmation.
Comment 7 Draga 2015-08-21 09:51:40 UTC
LO 5.0.0.5
The problem is not solved.
Comment 8 Draga 2016-04-19 06:51:51 UTC
LO 5.1.2.2
The problem is not solved.
Comment 9 Aron Budea 2016-05-10 22:14:06 UTC
I can reproduce that there is a dialog about the document being locked if it's loaded from a read-only Samba share.
LO 5.1.2.2, Windows 7, and in 3.3 as well.
Same in LO 5.1.2.2, Linux (for some reason in Linux 5.0.5.2 does not show dialog, lets you open the file in edit mode, but of course save fails).

I didn't check behavior with locally set read-only files.


Master build has a slightly different dialog:
"Document file 'test.odt' is locked for editing by yourself on a different system since 

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

Might be just because the Samba user name is the same as my local user.

Version: 5.2.0.0.alpha1+
Build ID: 039b75d6cdc26dcce03e37c67115405e6f2a8ebe
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
Locale: hu-HU (hu_HU)
Comment 10 Aron Budea 2016-12-17 22:31:31 UTC
*** Bug 104652 has been marked as a duplicate of this bug. ***
Comment 11 peekaa 2016-12-18 09:34:15 UTC
Yes, pls do something about this. In my school we got plenty of documents on shared folders, mostly for students/teachers in read-only mode /most shares are read-only on samba/. When students open any documents, they got all the time annoying message, that the file is in use. Why is that? Could that be pls remove, or be able disabled in settings? The situation is quite similar as if you open email attachment, isnt it?  Thank you very much.
Comment 12 QA Administrators 2017-12-19 03:32:49 UTC Comment hidden (obsolete)
Comment 13 Draga 2017-12-19 05:20:14 UTC
LO 5.4.3.2
The problem is not solved.
Comment 14 Draga 2018-02-27 08:44:39 UTC
LO 6.0.1.1
The problem is not solved.
Comment 15 QA Administrators 2019-02-28 03:51:50 UTC Comment hidden (obsolete)
Comment 16 nep49a 2019-04-26 08:51:47 UTC
This bug in all versions of LibreOffice (3.3.0.4 - 6.6.3.2)

OpenOffice 4.1.5 opens documents from read-only folders in read-only mode without a dialog box, see how it is done in it.
Comment 17 Draga 2019-08-13 11:25:44 UTC
LO 6.3.0.2   The problem is not solved.

OO 4.1.6   The problem is not present. OO 4.1.6 opens documents from read-only folders in read-only mode without a dialog box.
Comment 18 Draga 2020-01-27 11:11:15 UTC
LO 6.4.0.2   The problem is not solved.
Comment 19 Draga 2020-08-06 07:53:22 UTC
LO 7.0.0.3   The problem is not solved.
Comment 20 Draga 2022-07-27 13:17:06 UTC
LO 7.4.0.1   The problem is not solved.
Comment 21 Draga 2023-01-11 12:33:02 UTC
LO 7.5.0.1   The problem is not solved.

The dialog box has been changed, but the problem is not solved.
Comment 22 Draga 2023-07-24 06:09:23 UTC
LO 7.6.0.1   The problem is not solved.
The dialog box has been changed and has become multilingual.