FILEOPEN: Opening file from Samba share produce Document in Use dialog (~/.gvfs or mount.cifs)

Bug #1430531 reported by Norbert on 2015-03-10
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
LibreOffice
Unknown
Medium
libreoffice (Ubuntu)
Undecided
Unassigned

Bug Description

This bug is somehow related to other - LibO 72337 [1].

I'm on Ubuntu 12.04.5 with all updates and LibreOffice 3.5.7.2
Build ID: 350m1(Build:2)
(libreoffice 1:3.5.7-0ubuntu7) from official repository.
The problem exists in more modern versions of LibreOffice from PPA (3.6.6-0ubuntu1~precise1~ppa1 , 4.0.4~rc2-0ubuntu1~precise1 , 4.1.6-0ubuntu1~precise1~ppa1 , 4.2.8~rc2-0ubuntu1~precise1 , 4.3.6~rc2-0ubuntu1~precise1 , 4.4.1~rc2-0ubuntu1~precise1).

Steps to reproduce:
1. I have shared Public folder (read write, allow guest) from other Ubuntu 12.04.5 laptop using nautilus-share (0.7.3-1ubuntu2), placed test.odt file in it.
2a. I navigate Nautilus on other laptop to smb://laptop/public, clicked 'Open in Terminal here' (or launch terminal and "cd ~/.gvfs/public\ on\ laptop"). Run "libreoffice test.odt" in terminal.
2b. I navigate Nautilus on other laptop to smb://laptop/public, clicked on 'test.odt' file.
2c. I mount share from terminal with
sudo mount.cifs //192.168.3.11/public /mnt/smb/ -o uid=`id -u`,gid=`id -g`,guest,sec=none,noperm
then
libreoffice /mnt/smb/test.odt

3. Got "Document in Use" window with text:

   Document file 'test.odt' is locked for editing by:

   Unknown User

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

   Open Read-Only Open Copy Cancel

4a. If I click 'Open Read-Only' the document is opened in read-only.
4b. If I click 'Open Copy' the "Untitled 1" document is opened.
4c. Cancel closes this window.

Expected results:
   The "test.odt" files is opened in read-write mode, user can edit it.

Actual results:
   User can't edit original document (see pp. 3-4 above).

This functionality is essential. Please fix this bug.

Notes:
  If I try to open document with the command 'libreoffice smb://laptop/public/test.odt' I run into other bug (bug 1214352).
  If I use Windows as SMB/CIFS server I can open and edit document from share.
  Problem does not exist with SFTP(SSH)- or NFS- file-servers.
  My test results are located in Google Docs/Drive Table ( http://goo.gl/jY9Ubj ).

  Global Samba config (/etc/samba/smb.conf) is default.
  My useshare config is:
    cat /var/lib/samba/usershares/public
    #VERSION 2
    path=/home/norbert/Public
    comment=
    usershare_acl=S-1-1-0:F
    guest_ok=y
    sharename=Public

1. https://bugs.documentfoundation.org/show_bug.cgi?id=72337 .

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: libreoffice 1:3.5.7-0ubuntu7
ProcVersionSignature: Ubuntu 3.13.0-46.77~precise1-generic 3.13.11-ckt15
Uname: Linux 3.13.0-46-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.0.1-0ubuntu17.8
Architecture: amd64
Date: Tue Mar 10 23:52:04 2015
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100429)
MarkForUpload: True
SourcePackage: libreoffice
UpgradeStatus: No upgrade log present (probably fresh install)

The bug is somehow related to bug#72337.

I'm on Ubuntu 12.04.5 with all updates and LibreOffice Version: 4.4.1.2
Build ID: 40m0(Build:2) (libreoffice 1:4.4.1~rc2-0ubuntu1~precise1) from PPA.

Steps to reproduce:
1. I have shared my Public folder using nautilus-share (0.7.3-1ubuntu2), placed test.odt file in it.
2. I navigate Nautilus to smb://localhost, clicked Open in Terminal here (or launch terminal and "cd ~/.gvfs/public\ on\ localhost").
3. Run "libreoffice test.odt" in terminal.
4. Got "Document in Use" window with text:

   Document file 'test.odt' is locked for editing by:

   Unknown User

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

   Open Read-Only Open Copy Cancel

5a. If I click 'Open Read-Only' the document is opened in read-only.
5b. If I click 'Open Copy' the "Untitled 1" document is opened.
5c. Cancel closes this window.

Expected results:
   The "test.odt" files is opened in read-write mode, user can edit it.

Actual results:
   User can't edit original document (see pp. 4-5 above).

This functionality is essential. Please fix this bug.

The bug is somehow related to bug#72337.

I'm on Ubuntu 12.04.5 with all updates and LibreOffice Version: 4.4.1.2
Build ID: 40m0(Build:2) (libreoffice 1:4.4.1~rc2-0ubuntu1~precise1) from PPA.

Steps to reproduce:
1. I have shared my Public folder using nautilus-share (0.7.3-1ubuntu2), placed test.odt file in it.
2. I navigate Nautilus to smb://localhost, clicked Open in Terminal here (or launch terminal and "cd ~/.gvfs/public\ on\ localhost").
3. Run "libreoffice test.odt" in terminal.
4. Got "Document in Use" window with text:

   Document file 'test.odt' is locked for editing by:

   Unknown User

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

   Open Read-Only Open Copy Cancel

5a. If I click 'Open Read-Only' the document is opened in read-only.
5b. If I click 'Open Copy' the "Untitled 1" document is opened.
5c. Cancel closes this window.

Expected results:
   The "test.odt" files is opened in read-write mode, user can edit it.

Actual results:
   User can't edit original document (see pp. 4-5 above).

This functionality is essential. Please fix this bug.

Bug exists in LibreOffice "Version: 4.3.6.2 Build ID: 430m0(Build:2)" (1:4.3.6~rc2-0ubuntu1~precise1).

Bug exists in LibreOffice "Version: 4.3.6.2 Build ID: 430m0(Build:2)" (1:4.3.6~rc2-0ubuntu1~precise1).

Can this problem be reproduced on a newer Ubuntu version than 12.04 (e.g. on 14.04 or 15.10)? If not, this likely is yet another case of: https://launchpad.net/bugs/1103953

Can this problem be reproduced on a newer Ubuntu version than 12.04 (e.g. on 14.04 or 15.10)? If not, this likely is yet another case of: https://launchpad.net/bugs/1103953

I did some research with different versions of LibO and on different distros.
The test method was as follows: I set Samba public share on my other laptop, created document in this share, then connect to it.
Here is a Google Docs Table ( http://goo.gl/jY9Ubj ):
* I got message about repairing only in 12.04.5 with LibO 4.x
* In other distros I got 'Document in Use' very often.

After this research I can't determine why 'Document in Use' message is produced.

I did some research with different versions of LibO and on different distros.
The test method was as follows: I set Samba public share on my other laptop, created document in this share, then connect to it.
Here is a Google Docs Table ( http://goo.gl/jY9Ubj ):
* I got message about repairing only in 12.04.5 with LibO 4.x
* In other distros I got 'Document in Use' very often.

After this research I can't determine why 'Document in Use' message is produced.

I did deeper research ( see comment 23 at https://bugs.documentfoundation.org/show_bug.cgi?id=72337#c23 ).

    So for me it seems that there is a difference in communication between
    Samba SMB/CIFS (or Windows SMB/CIFS) server and LibreOffice.
    I do not know how to debug this. Both SMB/CIFS servers provide full read and
    write access on file level (via GVFS and mount.cifs).
    Samba SMB/CIFS share was created with nautilus-share addon, without any error
    messages and non-standard configuration.

    My results are summarized in Google Docs table ( http://goo.gl/jY9Ubj ).

I need confirmation from other users.

I did deeper research ( see comment 23 at https://bugs.documentfoundation.org/show_bug.cgi?id=72337#c23 ).

    So for me it seems that there is a difference in communication between
    Samba SMB/CIFS (or Windows SMB/CIFS) server and LibreOffice.
    I do not know how to debug this. Both SMB/CIFS servers provide full read and
    write access on file level (via GVFS and mount.cifs).
    Samba SMB/CIFS share was created with nautilus-share addon, without any error
    messages and non-standard configuration.

    My results are summarized in Google Docs table ( http://goo.gl/jY9Ubj ).

I need confirmation from other users.

Norbert (nrbrtx) wrote :
Norbert (nrbrtx) on 2015-03-10
description: updated
Norbert (nrbrtx) on 2015-03-10
description: updated

Since this is reported against LibreOffice using gvfs on Ubuntu 12.04, please make sure to reproduce on a current release to make sure this isnt yet another sideeffect of Bug 1214352. Thanks.

Changed in libreoffice (Ubuntu):
status: New → Incomplete
Changed in df-libreoffice:
importance: Unknown → Medium
status: Unknown → Incomplete

Dear Bjorn!
This bug exists in modern versions of Ubuntu too.

I set SMB/CIFS *server* in Ubuntu 14.04.2 and connected to it from other
*client* distros - I got "Document in Use" very often (see my table - http://goo.gl/jY9Ubj , sheet "Ubuntu 14.04 Samba Server").

Please fix this bug.
I'm ready to help, provide more information, to test dev-builds and so on.

Dear Bjorn!
This bug exists in modern versions of Ubuntu too.

I set SMB/CIFS *server* in Ubuntu 14.04.2 and connected to it from other
*client* distros - I got "Document in Use" very often (see my table - http://goo.gl/jY9Ubj , sheet "Ubuntu 14.04 Samba Server").

Please fix this bug.
I'm ready to help, provide more information, to test dev-builds and so on.

Changed in df-libreoffice:
status: Incomplete → New

Hello Norbert, bug 72337 is fixed. Do you have still the problem in actual version of LO?

Hello Norbert, bug 72337 is fixed. Do you have still the problem in actual version of LO?

Set to NEEDINFO.
Change back to UNCONFIRMED, if the problem persists. Change to RESOLVED WORKSFORME, if the problem went away.
(Or should it be duplicate of 72337 if it works..?)

Set to NEEDINFO.
Change back to UNCONFIRMED, if the problem persists. Change to RESOLVED WORKSFORME, if the problem went away.
(Or should it be duplicate of 72337 if it works..?)

Changed in df-libreoffice:
status: New → Incomplete

Dear Bug Submitter,

This bug has been in NEEDINFO status with no change for at least
6 months. Please provide the requested information as soon as
possible and mark the bug as UNCONFIRMED. Due to regular bug
tracker maintenance, if the bug is still in NEEDINFO status with
no change in 30 days the QA team will close the bug as INSUFFICIENTDATA
due to lack of needed information.

For more information about our NEEDINFO policy please read the
wiki located here:
https://wiki.documentfoundation.org/QA/Bugzilla/Fields/Status/NEEDINFO

If you have already provided the requested information, please
mark the bug as UNCONFIRMED so that the QA team knows that the
bug is ready to be confirmed.

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

Warm Regards,
QA Team

MassPing-NeedInfo-Ping-20161108

Dear Bug Submitter,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-20161207

Konstantin Frank (constin) wrote :

Hello , problem still pending, i don't have problem with readonly NFS system , but have with SMB. SAL_ENABLE_FILE_LOCKING disabled, FILE_LOCKING disabled

Could you please tell me part of code , where libreoffice check filesystem? i'll try to disable this check for SMB.

Olivier Tilloy (osomon) on 2018-03-12
Changed in libreoffice (Ubuntu):
status: Incomplete → New
Konstantin Frank (constin) wrote :

Update:

I partially found problem reason. Problem appears if:
SMB share server side: "read only", and client mount it by default in RW mode. Then client (and libreoffice) think , ok , this is RW SMB source i could put my lock file on it. But server answer back off, this is read only share.
Solution is mount these RO shares as RO on client side too. Normal GUI user cannot use this solution due to gvfs will be mount it in RW by default.

Changed in df-libreoffice:
importance: Medium → Unknown
status: Incomplete → Unknown
Changed in df-libreoffice:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.