Bug 153318 - Cannot save or open files on gvfs mounted smb share
Summary: Cannot save or open files on gvfs mounted smb share
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.0.4.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: haveBacktrace
Depends on:
Blocks: Network
  Show dependency treegraph
 
Reported: 2023-02-02 08:05 UTC by nico.winkelstraeter
Modified: 2024-08-12 11:14 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Configuration of the samba Server (11.86 KB, text/plain)
2023-02-02 08:05 UTC, nico.winkelstraeter
Details
strace log when opening the file on the smb share (5.96 MB, text/x-log)
2023-02-02 08:06 UTC, nico.winkelstraeter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nico.winkelstraeter 2023-02-02 08:05:34 UTC
Created attachment 185058 [details]
Configuration of the samba Server

I cannot open or save files to a smb share which is mounted via gvfs.
This happens on a up to date Debian 11.6.
(Specifically a machine configured as a Debian-Edu Workstation but I don't think that makes any difference)
I also attached the configuration of the samba server in case that is relevant.

This was first observed on a Debian-Edu deployment which is already in use for a while but I could also reproduce this on a fresh install on VMs.
Saving with with other programs like gimp, inkscape, gnumeric works just fine. 

gvfs Version: 1.46.2-1
LibreOffice 7.0.4.2 00(Build:2)

When saving from LibreOffice with File-Save as to the gvfs mount.

==============================================================
Error saving the document Test:
Object not accessible.
The object cannot be accessed due to insufficient user rights.
==============================================================

After saving locally, copying to gvfs mount and then trying to open from Thunar with right click "Open with LibreOffice Writer"

==================================================
Document file 'Test.odt' is locked for editing by:

Unknown User
==================================================

If I try open with double clicking the LO splash screen briefly shows but nothing else happens.

When trying to open the file from within LibreOffice via File->Open nothing happens.

I attached the strace.log from the following command.

lowriter --strace /run/user/1007/gvfs/smb-share\:server\=tjener.local\,share\=transfer-students/s1/Test.odt

Related Bugs:
Bug 128505
Bug 115747
Comment 1 nico.winkelstraeter 2023-02-02 08:06:11 UTC
Created attachment 185059 [details]
strace log when opening the file on the smb share
Comment 2 nico.winkelstraeter 2023-02-02 11:22:51 UTC
I also just tested this with LibreOffice from bullseye-backports which is version LibreOffice 7.4.4.2 40(Build:2)

The same behavior occurs.

On Ubuntu 22.04 with LibreOffice 7.3.7.2 30(Build:2) this behavior does not occur.
Comment 3 nico.winkelstraeter 2023-02-03 12:13:02 UTC
I narrowed this down a little further.
It seems to depend on what URI is passed to LibreOffice.
When the path to the gvfs mount at /run/user/1000/gvfs/... is used, LO tries to write to lock file using the pwrite system call which is apparently not supported by gvfs:

3189  09:39:01.222996 openat(AT_FDCWD, "/run/user/1007/gvfs/smb-share:server=tjener.local,share=transfer-students/s1/.~lock.write-test.odt#", O_RDONLY) = -1 ENOENT (No such file or directory)
3189  09:39:01.224609 openat(AT_FDCWD, "/run/user/1007/gvfs/smb-share:server=tjener.local,share=transfer-students/s1/.~lock.write-test.odt#", O_RDWR|O_CREAT|O_EXCL, 0666) = 24
3189  09:39:01.231861 fstat(24, {st_mode=S_IFREG|0700, st_size=0, ...}) = 0
3189  09:39:01.231986 pread64(24, "", 4096, 0) = 0
3189  09:39:01.235114 pwrite64(24, ",testes,am-5254007fbccd.intern,03.02.2023 09:39,file:///home/testes/.config/libreoffice/4;", 90, 0) = -1 EOPNOTSUPP (Operation not supported)

But when passing a smb:// URI LibreOffice uses some other method to read and write the files.
There are no reads or writes to the file in the strace in that case but recvmsg and sendmsg calls. I guess it uses some DBUS Interface.

What URI LO recieves depends on the Desktop Environment.
With gnome this works properly but it does not on xfce and Mate.
Comment 4 Stéphane Guillou (stragu) 2023-03-10 23:07:14 UTC
Thank you for having such a close look at it, Nico, especially regarding the difference between desktop environments. For example, in bug 140488, the use of Caja probably means Mate is used.

I assume you were using Xfce on Debian-Edu?
Comment 5 QA Administrators 2023-09-14 03:06:06 UTC Comment hidden (obsolete)
Comment 6 QA Administrators 2023-10-15 03:16:40 UTC
Dear nico.winkelstraeter,

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-FollowUp