Bug Hunting Session
Bug 63830 - Cannot save file over SSH
Summary: Cannot save file over SSH
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.0.2.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium critical
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-23 08:44 UTC by Edmund Laugasson
Modified: 2015-05-23 16:13 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
strace log in Linux with LibreOffice 5.0.0.0.beta1 (53.81 KB, text/plain)
2015-05-23 15:57 UTC, Edmund Laugasson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Edmund Laugasson 2013-04-23 08:44:31 UTC
Steps to reproduce:
1. Log into another computer over SSH using Nautilus (File->Connect to server...)
2. Open LibreOffice and any program inside it - Writer, Calc, Impress, Draw, etc
3. Type something
4. Try to save onto that mounted folder over SSH - it is impossible.

Error message is, that I do not have enough rights. But I am logged in with same username and password which are used in that folder I am saving.
E.g. username: user and I am saving file into /home/user/Documents/

Using Ubuntu 12.04 LTS 64-bit with all latest updates and LibreOffice 4.0.2.2 64-bit. Tested with Writer, Calc, Impress, Draw - same problem with all of them.

Workaround I found: save at first file into local computer, then copy it to remote computer over SSH and then there is possible after opening also save this file. But when I open at first LibreOffice and try to save directly onto remote folder over SSH - does not work.
Comment 1 Petr Mladek 2013-04-29 11:40:10 UTC
I have troubles to even login to the other computer using Nautilus (File->Connect to server...). It seems that it tries to mount the file over sftp protocol. I there is needed a special service running on the other host.

Anyway, I lower the severity a bit. It is rather special scenario and affects only limited group of users. Of course, we should fix it ASAP but this fix could not block the bug fix releases with other useful fixes.
Comment 2 Edmund Laugasson 2013-04-29 14:16:35 UTC
This requires OpenSSH Server to be installed to log in.
In Ubuntu: sudo apt-get update && sudo apt-get install openssh-server

More info:
http://packages.ubuntu.com/search?keywords=openssh-server&searchon=names&suite=all&section=all

Problem is, that people would like to use their folders securely over SSH and this is currently complicated. So I should consider other, less secure ways.
Comment 3 Igor Gnatenko 2013-06-24 08:46:42 UTC
I think that you using wrong user/pass.
I tested and couldn't reproduce.
Petr, can you test this bug again ?
nautilus-extensions-3.8.2-1.fc19.x86_64
openssh-server-6.2p2-3.fc19.x86_64
libreoffice-core-4.1.0.0-9.beta2.fc19.x86_64
openssh-6.2p2-3.fc19.x86_64
nautilus-3.8.2-1.fc19.x86_64
nautilus-sendto-3.8.0-1.fc19.x86_64
openssh-clients-6.2p2-3.fc19.x86_64
Comment 4 QA Administrators 2014-02-02 02:07:02 UTC
Dear Bug Submitter,

Please read the entire message before proceeding.

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 INVALID due to lack of needed information.

For more information about our NEEDINFO policy please read the wiki located here: 
https://wiki.documentfoundation.org/QA/FDO/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
Comment 5 Edmund Laugasson 2014-02-02 03:01:28 UTC
I tested and confirm:
64-bit Ubuntu 12.04 LTS with all current updates (2nd February 2014)
LibreOffice 4.2.0.4
Nautilus 3.4.2-0ubuntu9
Nautilus sendto 3.0.1-2ubuntu2
OpenSSH 5.9p1-5ubuntu1.1

Result - nothing happens - no error messages and also file is not opened.
Comment 6 Edmund Laugasson 2014-02-02 03:02:41 UTC
(In reply to comment #5)
> I tested and confirm:
> 64-bit Ubuntu 12.04 LTS with all current updates (2nd February 2014)
> LibreOffice 4.2.0.4
> Nautilus 3.4.2-0ubuntu9
> Nautilus sendto 3.0.1-2ubuntu2
> OpenSSH 5.9p1-5ubuntu1.1
> 
> Result - nothing happens - no error messages and also file is not opened.

Certainly I could also not save document over SSH...
Comment 7 Julien Nabet 2014-06-19 21:46:22 UTC
I don't use Nautilus but I could save a brand new file on local ssh server. (pc Debian x86-64 with 4.2.4 LO Debian package).
Take a look to fdo#57806 for details.
Comment 8 Edmund Laugasson 2014-06-20 00:23:57 UTC
Yes - now saving is possible. Using LibreOffice 4.2.4.2 and Ubuntu 12.04 LTS (both 64-bit) I could also save over SFTP (SSH connection) the file using Nautilus 3.4.2.

But I cannot now open that directly from LibreOffice (File->Open) - LibreOffice will just crash - window closes and opening LibreOffice again - it will offer to restore file(s), that were open. I tried to open from history or browse directly any file over SSH - it is impossible to open.

So what kind of benefit can I have of saving file if I cannot open no one later?

At the same time over plain FTP - it works. But over SSH - it does not.

I also tested in this way, that if I open in Nautilus filemanager over SSH the folder and try to open any office document from there - then it is possible.

I checked the path, what is used for documents opened in different ways.

When saving from LibreOffice directly over SSH, then path will be "sftp://user@host/home/user/file.odt" - such file is impossible open from LibreOffice - it will crash right away.

When opening file from SSH mounted folder, then path will be "/home/user/.gvfs/user at SFTP host hostname/home/user/file.odt" - with such path the file can be opened without any problem.

So - in this way a workaround exist - I have to open SSH-mounted folder at first and then document from there using filemanager (currently Nautilus - did not tested others). It means, that I need to change also file associations to ensure it opens with LibreOffice. Because I cannot open file directly from LibreOffice as usually expected. Sometimes there might be a files, which might not be directly associated with LibreOffice. As we know - regular users are not familiar with changing file associations. So - in this case we have a problem.

Usually is so, that if SSH share is added as bookmark - when I am saving the file, I choose File-Save or CTRL+S and save over SSH to server the file using bookmark for easier and instant access. Then such file remain also into history of recently used files. When I try to open that recently used file - LibreOffice will crash. This will quite disturb users if they try to open recently used files and users have to keep in mind, that you cannot open file from LibreOffice but only from filemanager.

I just describe the situation where e.g. in school there is SSH server (no matter - in local network or outside internet) - there is bookmarked SSH share, where teachers and also students would like to save their files - also with LibreOffice.

So I really hope, that here is possible to do something with that bug.
Comment 9 Julien Nabet 2014-06-20 05:31:49 UTC
Edmund: I hadn't told about opening because the crash concerned saving but I could open too without crash.

Just for the test, could you rename your LO directory profile (see https://wiki.documentfoundation.org/UserProfile#GNU.2FLinux) and give it a new try? The goal is to exclude any problem customization due to bugs from older LO versions.
Comment 10 Edmund Laugasson 2015-05-23 15:51:14 UTC
Using 64-bit Linux Mint Cinnamon 17.1 with 4.0.4-040004-generic kernel
LibreOffice version: 5.0.0.0.beta1
Build ID: 0a16c3dda4150008d9be6f24cbd15ac198d116d3
Locale: et-EE (et_EE.UTF-8)

Using the address ssh://localhost/home/test
host: localhost
user: test

Changed dialogs to LibreOffice dialogs to be able log in using SSH.

Everything worked without problems.
Comment 11 Julien Nabet 2015-05-23 15:53:50 UTC
Thank you for your feedback, let's put this one to WFM.
Comment 12 Edmund Laugasson 2015-05-23 15:57:19 UTC
Created attachment 115903 [details]
strace log in Linux with LibreOffice 5.0.0.0.beta1

Using 64-bit Linux Mint Cinnamon 17.1 with 4.0.4-040004-generic kernel
LibreOffice version: 5.0.0.0.beta1
Build ID: 0a16c3dda4150008d9be6f24cbd15ac198d116d3
Locale: et-EE (et_EE.UTF-8)

Saving directly from LibreOffice, not using any filemanager.

using the following packages:
openssh-blacklist 0.4.1+nmu1
openssh-blacklist-extra 0.4.1+nmu1
openssh-client 1:6.6p1-2ubuntu2
openssh-server 1:6.6p1-2ubuntu2
openssh-sftp-server 1:6.6p1-2ubuntu2
Comment 13 Edmund Laugasson 2015-05-23 16:05:47 UTC
Using 64-bit Linux Mint Cinnamon 17.1 with 4.0.4-040004-generic kernel
LibreOffice version: 5.0.0.0.beta1
Build ID: 0a16c3dda4150008d9be6f24cbd15ac198d116d3
Locale: et-EE (et_EE.UTF-8)

Now tested also using the Nemo v2.4.5 file manager - the default file manager in Cinnamon desktop at Linux Mint.

Saved to the mounted SSH share with the following path (copied from LibreOffice dialog):
/run/user/1000/gvfs/sftp:host=localhost,user=test/home/test

This path seems to be different than saving directly from LibreOffice without using any file manager - ssh://localhost/home/test

Tried:
* open file
* save changed file
* save under different name

Everything worked well - no problems.

My error was reported first time using Ubuntu 12.04 LTS 64-bit. As there are already 14.04 LTS, which is also base for Linux Mint 17.1 then it seems that this is solved.
Comment 14 Edmund Laugasson 2015-05-23 16:13:11 UTC
Using 64-bit Linux Mint Cinnamon 17.1 with 4.0.4-040004-generic kernel
LibreOffice version: 5.0.0.0.beta1
Build ID: 0a16c3dda4150008d9be6f24cbd15ac198d116d3
Locale: et-EE (et_EE.UTF-8)


Now tested even that way:

* open program
* write to the filename field
sftp://user@host/home/user/ and also ssh://user@host/home/user/
* press enter
* password for user test will be asked
* after logging in there is possible to open and save the file over SSH

The requirement is that LibreOffice dialogs must be enabled, otherwise it will not work.