Bug 1054952

Summary: libre-office 4.1.4.2 won't open files on SMB shares; build 4.1.4.2-2.fc20
Product: [Fedora] Fedora Reporter: bob <redzilla.coralnut>
Component: libreofficeAssignee: Stephan Bergmann <sbergman>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 20CC: caolanm, dtardon, erack, ltinkl, mstahl, noesgaard, redzilla.coralnut, sbergman
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libreoffice-4.2.6.3-8.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-14 04:37:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
screenshot of a password dialog for windows share none

Description bob 2014-01-17 19:50:04 UTC
Description of problem:

Libre office fails to open files residing on SMB shares.  

When browsing an SMB share via Dolphin, I attempt to open an .XLS or a .DOC file by clicking on it.  LibreOffice shows a splash screen and then exits without opening the file. 

This behavior began following the F20 upgrade.  On my F18 install LO would open the file, allow me to edit a local copy in /tmp, and when exiting the application, it would automatically upload the modified file back to the SMB share.  

Effective with the F20 upgrade, LO fails to open the shared file.  File / networking permissions are not the problem.  The username:password pair for accessing the SMB share has been provided in KDE 4.11.4 via System Settings > Networking and Connectivity > Sharing.  The result is that I am able to access the share via Dolphin using my network user credentials, copy the file from the SMB share to a local folder, and edit it in LO.  The only problem is that LO is not able to directly access the file successfully when it is on the SMB share. 


Version-Release number of selected component (if applicable):

Libre-Office 4.1.4.2-2.fc20
KDE 4.11.4

How reproducible:

Every Time

Steps to Reproduce:
1. Brows an SMB Share using Dolphin
2. Double-click on the shared file to launch Libre-Office
3. Watch Libre-Office display splash screen then exit.

Actual results:

LO fails to open SMB shared files.

Expected results:

LO should open SMB shared file for editing, creating a local copy in /tmp, and then upload the file back to the SMB share upon exiting.

Additional info:

Comment 1 David Tardon 2014-01-21 08:47:09 UTC
dtardon->sberg: One for you, I presume?

Comment 2 bob 2014-04-02 21:09:41 UTC
4.2.1.1 has the same problem.

Comment 3 Stephan Bergmann 2014-09-23 13:39:26 UTC
The /usr/share/applications/libreoffice-*.desktop files all contain

  X-KDE-Protocols=file,http,smb,ftp,webdav

where the "smb" apparently cauess Dolphin to directly pass smb URLs to LibreOffice to open (instead of going via some /var/tmp filepath workarounds).

Internally, the Fedora LibreOffice builds use GIO to resolve smb URLs, and GIO in turn internally requires the gvfs-smb package to access smb URLs.  That package is apparently not installed by default in KDE spins.

Bob, I assume that "sudo yum install gvfs-smb" would make the problem go away for you?

The right fix would be to either remove "smb" from the /usr/share/applications/libreoffice-*.desktop files or to let the packages bringing along those files require gvfs-smb.  The latter is probably preferable, as it avoids Dolphin's /var/tmp filepath workaround and allows LibreOffice to access the smb files directly.  David, any opinion?

Comment 4 Stephan Bergmann 2014-09-23 13:40:19 UTC
*** Bug 1135979 has been marked as a duplicate of this bug. ***

Comment 5 Stephan Bergmann 2014-09-23 14:48:00 UTC
(so I took the "require gvfs-smb" route)

Comment 6 Stephan Bergmann 2014-09-23 14:50:43 UTC
(see <https://bugs.freedesktop.org/show_bug.cgi?id=67527#c20> how to set up a local smb server for test purposes)

Comment 7 bob 2014-09-24 11:49:13 UTC
> Bob, I assume that "sudo yum install gvfs-smb" would make the problem go away for you?

Thanks for the help.  gvfs-smb did bring me closer, but I'm still not there.  Something else is still wrong.

Before installing gvfs-smb, the behavior of dolphin when attempting to open an .xls file on a remote share was for nothing to happen.  I might get a dancing wait-state icon for a few seconds, but nothing would ever happen in terms of opening a file.

After installing gvfs-smb, the behavior of dolphin did change.  Now when I click on a shared .XLS file I'm seeing a Libre-Office spash screen, and I see a status bar that begins to move across the pop-up window... but the process collapses when the status bar is half-way across and the file never gets opened.

FWIW, PDF files open just fine using Dolphin to browse the SMB share.  It's the LO types of files that aren't opening.


It's almost as if we've solved one necessary condition, but another one remains.  Installing gvfs-smb alone it's not sufficient to fix the problem.  It's as if something else needs to be loaded that isn't here.

recommendations?

Comment 8 Stephan Bergmann 2014-09-24 12:53:30 UTC
(In reply to bob from comment #7)
> After installing gvfs-smb, the behavior of dolphin did change.  Now when I
> click on a shared .XLS file I'm seeing a Libre-Office spash screen, and I
> see a status bar that begins to move across the pop-up window... but the
> process collapses when the status bar is half-way across and the file never
> gets opened.

"a status bar that begins to move across the pop-up window": that pop-up window is the (green) LibreOffice splash screen, not a proper LibreOffice Calc window, right?

> recommendations?

If you could follow the instructions at <https://bugzilla.redhat.com/show_bug.cgi?id=1135979#c1>, that would hopefully give us a clue.

Comment 9 bob 2014-09-24 16:06:31 UTC
I just posted my attachment file to the closed bug by mistake. /*facepalm*/

on my system, it was not possible to invoke soffice directly via the command line, because the file's location was not in the system path.  i had to pass the full path on the command line to get strace to open the LO application:

/opt/libreoffice4.2/program/soffice

unfortunately, no log file was created, though I performed the procedure several times as a non-privileged user.  i'm thinking that this should not be done as root.

Comment 10 Stephan Bergmann 2014-09-25 08:24:40 UTC
*** Bug 1135979 has been marked as a duplicate of this bug. ***

Comment 11 Peter Andreasen 2014-09-25 08:57:31 UTC
Created attachment 941017 [details]
screenshot of a password dialog for windows share

Dialog showing when I try to open a word document on a windows share. The "username" field is not writable.

Comment 12 Peter Andreasen 2014-09-25 09:01:40 UTC
Edit to comment #11: This is what happens after I installed the gvfs-smb package. Any other document, such as a PDF file, opens without that dialog.

Comment 13 Stephan Bergmann 2014-09-25 09:21:51 UTC
(In reply to Peter Andreasen from comment #11)
> Dialog showing when I try to open a word document on a windows share. The
> "username" field is not writable.

But you can enter your password into the password field and the document then opens in LO, right?  (At least, that is what I reproduce with the local smb server setup from comment 6.)

The nuisance of having to re-enter the password would be due to the GNOME infrastructure internally used by LO to access the passed-in smb URL apparently not coordinating with the KDE infrastructure internally used by Dolphin to access the smb mount.

Comment 14 bob 2014-09-25 10:20:55 UTC
FWIW, here's another 2 cents worth:

I have been using LO on Fedora for a long time.  I reported the LO bug relating to failure to open files on a shared SMB partition for earlier Fedora versions, and that bug was rapidly fixed.  I'm not sure why the same problem is taking so long with F20 (this bug has been open since January and it's September now).  

FWIW, I haven't experienced the gnome infrastructure problem that was suggested in Comment 12 -- I've been using KDE exclusively on Fedora for many years, and I've NEVER had the problem of passwords not being passed properly in relation to opeining LO files on SMB shares.  In my experience LO and KDE never had a password passing problem -- that is to say, I never got hung up on loading files because of a password problem, where I was stuck because of a password prompt.  The files just either opened or they didn't, and a password prompt was never the problem.  I hope this helps.

Comment 15 Fedora Update System 2014-09-25 13:09:18 UTC
libreoffice-4.2.6.3-7.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/libreoffice-4.2.6.3-7.fc20

Comment 16 Fedora Update System 2014-09-25 13:10:21 UTC
libreoffice-4.3.2.2-3.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/libreoffice-4.3.2.2-3.fc21

Comment 17 Fedora Update System 2014-09-26 09:01:56 UTC
Package libreoffice-4.2.6.3-7.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing libreoffice-4.2.6.3-7.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-11524/libreoffice-4.2.6.3-7.fc20
then log in and leave karma (feedback).

Comment 18 bob 2014-09-26 11:08:17 UTC
works for me.

Comment 19 Fedora Update System 2014-09-28 04:25:55 UTC
libreoffice-4.2.6.3-7.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 20 Fedora Update System 2014-09-29 04:07:06 UTC
libreoffice-4.3.2.2-3.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 21 Peter Andreasen 2014-09-29 09:54:10 UTC
Updated to libreoffice 4.2.6.3-7 and gvfs-smb 1.18.3-3 today. Password dialog still pops up. If I enter a password, the file opens correctly.

Comment 22 Stephan Bergmann 2014-09-29 10:00:43 UTC
(In reply to Stephan Bergmann from comment #13)
> (In reply to Peter Andreasen from comment #11)
> > Dialog showing when I try to open a word document on a windows share. The
> > "username" field is not writable.
> 
> But you can enter your password into the password field and the document
> then opens in LO, right?  (At least, that is what I reproduce with the local
> smb server setup from comment 6.)
> 
> The nuisance of having to re-enter the password would be due to the GNOME
> infrastructure internally used by LO to access the passed-in smb URL
> apparently not coordinating with the KDE infrastructure internally used by
> Dolphin to access the smb mount.

(In reply to Peter Andreasen from comment #21)
> Updated to libreoffice 4.2.6.3-7 and gvfs-smb 1.18.3-3 today. Password
> dialog still pops up. If I enter a password, the file opens correctly.

@Lukáš Tinkl, in case you know about a way to fix that?

Comment 23 Lukáš Tinkl 2014-09-29 14:28:17 UTC
Hmm no idea, the dialog doesn't look like something coming from KDE

Comment 24 Stephan Bergmann 2014-09-29 15:53:18 UTC
(In reply to Lukáš Tinkl from comment #23)
> Hmm no idea, the dialog doesn't look like something coming from KDE

Sorry, my question was a bit terse.

What happens is that LO gets passed an smb URL from Dolphin, LO calls GIO's g_file_query_info on that URL, gets G_IO_ERROR_NOT_MOUNTED from GIO, calls GIO's g_file_mount_enclosing_volume, which calls back into LO's ooo_mount_operation_ask_password, which causes LO to display that dialog and pass the password back to GIO.

What would be necessary to make that additional password dialog go away is that the password/mount information available in Dolphin is available to GIO, either through some commonly used underlying infrastructure, or via some form of passing it through LO, in addition to the smb URL.  But this is extremely vague and I have no idea if anything like that would be possible.

Comment 25 bob 2014-10-03 19:29:22 UTC
This bug should not be closed.

I opened this bug.  As suggested, I've performed a de novo install, which resulted in an "official" installation, and an upgrade to latest version of LO in the repositories.  I can confirm that the problem with LO failing to open files on SMB shares has been fixed... sort of.

It seems that we've traded away one problem in order to gain another.

Now L-O is interposing an authentication layer that didn't exist before.  Specifically, when I browse an SMB share within Dolphin, and select an L-O file on the SMB share, LO does not directly open the file.  Instead, LO now opens a pop-up dialog box bearing the title bar "Authentication Required."  It fills-in my username, and requests a password.  A check-box is offered for "Remember password."

This authentication paradigm is a real problem.  There is no reason to require me to submit new authentication information.  My authentication information for accessing SMB shares is already being stored by KDE, and it appears that LO is failing to utilize this existing information.  From a user standpoint, the appearance of a new pop-up dialog that inappropriately requests re-authentication looks like the equivalent of a man-in-the-middle/keylogging attack that is being performed by LO.  This behavior is abnormal.  It represents a security problem that needs to be fixed.

When using Dolphin to browse SMB shares, no other software component requires me to deliver my username:password in order to open a file.  I have no problems playing multimedia that is stored on the SMB server; I have no problems opening PDF files that are stored on the SMB server.  But whenever I attempt to use an LO file, up pops this dialog which demands that I re-submit user credentials.  Unfortunately, I am not comfortable re-submitting this security information to an anonymous dialogt box, as I have absolutely no idea where this username:password information is being sent, or where it is being stored when the "Remember password" box is checked.

Is this something that can be addressed via this existing LO bug submission, or is it something that needs to be investigated separately as a Fedora security issue?

Comment 26 Stephan Bergmann 2014-10-06 09:53:51 UTC
(In reply to bob from comment #25)
> Now L-O is interposing an authentication layer that didn't exist before. 
> Specifically, when I browse an SMB share within Dolphin, and select an L-O
> file on the SMB share, LO does not directly open the file.  Instead, LO now
> opens a pop-up dialog box bearing the title bar "Authentication Required." 
> It fills-in my username, and requests a password.  A check-box is offered
> for "Remember password."

See this issue's sub-thread consisting of comment 11, comment 12, comment 13, comment 21, comment 22, comment 23, comment 24.

Maybe it would be best to remove "smb" from upstream <http://cgit.freedesktop.org/libreoffice/core/commit/?id=673be8e76856c6bc39f448f3374db4ae84258952> "add X-KDE-Protocols" (discussed at <http://lists.freedesktop.org/archives/libreoffice/2014-September/063621.html> "X-KDE-Protocols=...,smb,...").  (And thus remove Fedora LO's dependency on gvfs-smb again, which would also get rid of issue 1147649.)

Comment 27 Stephan Bergmann 2014-10-06 12:49:57 UTC
(In reply to bob from comment #0)
> This behavior began following the F20 upgrade.  On my F18 install LO would
> open the file, allow me to edit a local copy in /tmp, and when exiting the
> application, it would automatically upload the modified file back to the SMB
> share.  

Bob, did it fully automatically upload the file back, or did it present a dialog asking whether it shall upload back?

Comment 28 bob 2014-10-06 17:55:10 UTC
Stephan, I don't have the F18 setup any more, so I'll have to work from memory to answer your question.  

My recollection is that it never presented a dialog asking whether the upload to the originating share should occur.  But it's not fair to assume that in the absense of such a prompt, that the system would fully/automatically upload the file back.  There were a great many times that I lost data because the "fully automatic upload" silently failed with no error message, leaving the modified file in the local system's temp workspace where it was ultimately lost on power down.  Read on to find out why.

Back in the days of F18, office would download the shared file, edit it locally, and when saving/exiting, it would display a pop-up window to notify the user that the upload back to the original SMB share location was taking place.  when this happened, the upload to the originating share occured without user intervention.  It wasn't a transparent process, because the dialog appeared that allowed you to see what was happening, but when you saw that window you could at least assume that your data was saved.  Not seeing that window was a clue to an impending data loss problem.

Back in the days of F18, this automatic process worked fine as long as you were only editing one file.  If, on the other hand, you had several different office files opened from an SMB share, data loss could occur for all but the last file that was edited.

In F18 the upload-to-originating-share event seemed to be triggered by the close/exit of the LO application, rather than upon the closure of the file being edited.  If only the file being edited was closed, the latest revision of the file would remain on the user's temporary directory, and it wouldn't get uploaded back to the originating share until the upload was triggered by closing LO.

I'm not at all thrilled about going back to the F18 paradigm, unless steps are taken to ensure that the upload back to the originating share is triggered to occur upon closure of the file, and not upon closure of the office application.  If I had three office files open, and I saved and closed the first two and continued to work on a third, and then eventually closed the third file and exited the office application, only the last file that was in the process of being edited would be saved back to the originating share, and the other two would be left in the temporary workspace.  As you can imagine, files that get left in the temp workspace are subject to being lost.

That bug (I never reported it) resulted in the loss of a LOT of data.  I had to become very adept at saving files locally, and then manually moving them to the originating share.  If I had failed to manually perform a local save and an upload to the SMB server, I had to remember to search through the tmp folders for the file to recover them before the system got shut down.  If the system got shut down, the data became lost.

So the moral of the story for me is that the upload-to-SMB needs to be triggered by saving the file and not by exiting the application.

thanks for your time.

Comment 29 bob 2014-10-06 17:58:33 UTC
come to think of it, I did previously file a bug report relating to the failure to upload back to the originating shares.

Comment 30 Stephan Bergmann 2014-10-08 09:41:49 UTC
(In reply to Stephan Bergmann from comment #26)
> Maybe it would be best to remove "smb" from upstream
> <http://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=673be8e76856c6bc39f448f3374db4ae84258952> "add X-KDE-Protocols"
> (discussed at
> <http://lists.freedesktop.org/archives/libreoffice/2014-September/063621.
> html> "X-KDE-Protocols=...,smb,...").  (And thus remove Fedora LO's
> dependency on gvfs-smb again, which would also get rid of issue 1147649.)

Did just that now.  Consequently, Dolphin will pass /var/tmp filepath proxies for smb URLs to LO again, as in the past.  If there are any problems with that (like related to uploading modified documents back to the smb share), that would need to be addressed through the upstream feature request <https://bugs.freedesktop.org/show_bug.cgi?id=70712> "KDE: Support of 
opening and saving to a remote fs via KIO."  (Also see <http://lists.freedesktop.org/archives/libreoffice/2014-October/063904.html> "Re: X-KDE-Protocols=...,smb,...")

Comment 31 Fedora Update System 2014-10-09 08:43:57 UTC
libreoffice-4.2.6.3-8.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/libreoffice-4.2.6.3-8.fc20

Comment 32 Fedora Update System 2014-10-09 08:45:32 UTC
libreoffice-4.3.2.2-5.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/libreoffice-4.3.2.2-5.fc21

Comment 33 Fedora Update System 2014-10-10 16:00:07 UTC
Package libreoffice-4.2.6.3-8.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing libreoffice-4.2.6.3-8.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-12477/libreoffice-4.2.6.3-8.fc20
then log in and leave karma (feedback).

Comment 34 Fedora Update System 2014-10-12 05:03:22 UTC
libreoffice-4.3.2.2-5.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 35 bob 2014-10-12 18:41:58 UTC
Any chance that us F20 users will see this pushed into the Stable repository instead of Testing?  It would be nice to have access to the fix without having to resort to porting stable-only systems to the testing branch.

Comment 36 David Tardon 2014-10-13 06:34:17 UTC
Yes, when it fulfills the requirements:
https://fedoraproject.org/wiki/Updates_Policy#All_other_updates . There is _no_ chance to push "to Stable instead of Testing". The way is _always_ Testing -> Stable. Pushing updates directly to Stable is prohibited. Also, there is no "porting" involved in installing updates from testing. It is not a separate branch.

Comment 37 Fedora Update System 2014-10-14 04:37:49 UTC
libreoffice-4.2.6.3-8.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.