Bug 19896

Summary: I/O error on accessing file through sftp-mount
Product: Mageia Reporter: Marc Krämer <mageia>
Component: RPM PackagesAssignee: Olivier Blin <mageia>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: marja11, nicolas.salguero
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: sshfs-fuse CVE:
Status comment:

Description Marc Krämer 2016-12-05 16:29:27 CET
Mounting a remote filesystem (sftp) through pcmanfm and accessing files through this mount via libreoffice causes an I/O Error dialog.
This worked in mga5.

Acessing a text file (e.g.) via pluma works.

Accessing the file through a sshfs-mount works as well.

Acessing the file via command-line (as shown in run.log) causes the same error, but no more debug output :-(

libreoffice --writer 'file:///run/user/500/gvfs/sftp:host=sftp.hidrive.strato.com,user=XXXX/users/YYYY/Path/file.odt'

strace shows EOPNOTSUPP in contrast to execution on sshfs-mount:
lstat("/run/user/500/gvfs/sftp:host=sftp.hidrive.strato.com,user=XXXX/users/YYYY/Path/file.odt", {st_mode=S_IFREG|0644, st_size=1311268, ...}) = 0
open("/run/user/500/gvfs/sftp:host=sftp.hidrive.strato.com,user=XXXX/users/YYYY/Path/file.odt", O_RDWR|O_EXCL) = -1 EOPNOTSUPP (Operation not supported)
access("/run/user/500/gvfs/sftp:host=sftp.hidrive.strato.com,user=XXXX/users/YYYY/Path/file.odt", F_OK) = 0
lstat("/run/user/500/gvfs/sftp:host=sftp.hidrive.strato.com,user=XXXX/users/YYYY/Path/file.odt", {st_mode=S_IFREG|0644, st_size=1311268, ...}) = 0
Marja Van Waes 2016-12-06 23:09:11 CET

CC: (none) => marja11
Assignee: bugsquad => thierry.vignaud

Comment 1 Thierry Vignaud 2016-12-07 07:56:21 CET
Looks like a sshfs-fuse issue to me

Assignee: thierry.vignaud => bugsquad
Source RPM: libreoffice-5.2.3.3-5.mga6.src.rpm => sshfs-fuse

Comment 2 Marc Krämer 2016-12-07 09:45:17 CET
@Thierry sshfs-fuse works, but I don't know how this is used by pcmanfm
Comment 3 Marja Van Waes 2016-12-08 00:21:20 CET
(In reply to M K from comment #2)
> @Thierry sshfs-fuse works, but I don't know how this is used by pcmanfm

Blino might understand.

@ Olivier

Please reassign if needed.

Assignee: bugsquad => mageia

Comment 4 Nicolas Salguero 2016-12-14 23:23:47 CET
Hi,

I did some searches and found that the problem involves at least libfm (and maybe also gvfs-fuse).

Regarding libfm, that commit: https://github.com/lxde/libfm/commit/b08218e2311dc52465ef92502061738701f298c1 (FmAppInfo: Convert all URIs scheme to file:/// by mapping them to FUSE-mounted local paths) causes the fact that the command is "libreoffice --writer file:///..." in Cauldron whereas in Mga5 it is "libreoffice --writer sftp://...".

So, in our version of libfm, I added a patch that revert to the old behaviour when the command is libreoffice (http://svnweb.mageia.org/packages/cauldron/libfm/current/SOURCES/libfm-1.2.5-mga-do-not-use-gvfs-fuse-for-libreoffice.patch?view=markup).  That patch solves the problem.

But I think gvfs-fuse is also a part of the problem because, using the same libreoffice in Mga5 and Cauldron (the version 5.2.3, compiled from the upstream project):
  - libreoffice5.2 --writer "file:///..." can open the file in Mga5 (gvfs-fuse-1.22.3-2.1.mga5)
  - libreoffice5.2 --writer "file:///..." cannot open the file in Cauldron (gvfs-fuse-1.30.2-1.mga6).

Best regards,

Nico.

CC: (none) => nicolas.salguero

Comment 5 Marc Krämer 2016-12-15 02:24:04 CET
thanks for the investigation. In general I think the new behaviour of libfm is understandable since the files are already mapped to a local folder. Since gvfs is used by gnome-desktop the same problem might occur in this environment which will then have no benefit of the patch.
Comment 6 Marc Krämer 2016-12-15 15:16:53 CET
Just for the record: the updated package resolves the issue on lxde.
Comment 7 Marc Krämer 2017-09-22 12:14:45 CEST
fixed for lxde

Resolution: (none) => FIXED
Status: NEW => RESOLVED