Bug 389312 - When run on GNOME, fails to save file on Samba share mounted by GVFs; writes empty file instead
Summary: When run on GNOME, fails to save file on Samba share mounted by GVFs; writes ...
Status: RESOLVED FIXED
Alias: None
Product: kile
Classification: Applications
Component: general (other bugs)
Version First Reported In: 2.1.3
Platform: Ubuntu Linux
: NOR grave
Target Milestone: ---
Assignee: Michel Ludwig
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2018-01-22 12:03 UTC by Friedrich Feichtinger
Modified: 2018-01-30 14:24 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
SAMBA config file (9.66 KB, text/plain)
2018-01-25 13:21 UTC, Friedrich Feichtinger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Friedrich Feichtinger 2018-01-22 12:03:57 UTC
When I try to save a *.tex file on a samba share folder, kile refuses to save the file and prints the following error message:

"The document could not be saved, as it was not possible to write to /run/user/1000/gvfs/smb-share:server=mr-server,share=mr-share/_DOKUMENTATION_/MFA-datasheet/manual.tex.

Check that you have write access to this file or that enough disk space is available."


BUT: The file actually is created but has 0 bytes. When the file existed before, it gets overwritten with an empty file! This bug dumped my work of half a day already :-(

And yes: I have write access to the file and there is enough disk space.
Comment 1 Nate Graham 2018-01-22 22:22:28 UTC
If looks like you're running Kile with Unity, GNOME, XFCE, MATE, or Cinnamon, instead of KDE Plasma, right? I ask because based on the path, Kile is attempting to use a path to the Samba share that's provided by GNOME's GVFS instead of KDE's KIO.

Can you run the following terminal commands and send the output?

echo "Test" > "/run/user/1000/gvfs/smb-share:server=mr-server,share=mr-share/_DOKUMENTATION_/MFA-datasheet/test.txt"

cat "/run/user/1000/gvfs/smb-share:server=mr-server,share=mr-share/_DOKUMENTATION_/MFA-datasheet/test.txt"


If test.txt cannot be created or has no content, that means the path itself is invalid or not mounted with correct permissions, which is the fault of GVFS or Ubuntu, and not Kile.
Comment 2 Friedrich Feichtinger 2018-01-23 12:28:32 UTC
> If looks like you're running Kile with Unity, GNOME, XFCE, MATE, or Cinnamon, instead of KDE Plasma, right?

That's right. I'm using Ubuntu 17.10 with the default desktop (GNOME 3).

> Can you run the following terminal commands and send the output?
Yes, the test file is created and read without any problems.

Take a look at the permissions:

fritz@nexoc:/run/user/1000/gvfs/smb-share:server=mr-server,share=mr-share/_DOKUMENTATION_/MFA-datasheet$ ls -al
drwx------ 1 fritz fritz       0 Jän 23 13:09 .
drwx------ 1 fritz fritz       0 Jän 18 18:47 ..
-rwx------ 1 fritz fritz   22656 Jän 22 17:44 manual.tex
(some lines removed)

Also, as mentioned, Kile overwrites my file with an empty file. This would not be possible if Kile had no write permission.
Comment 3 Nate Graham 2018-01-23 18:43:07 UTC
Thanks for testing. Definitely sounds like an issue in Kile, then.
Comment 4 Michel Ludwig 2018-01-23 19:59:48 UTC
(In reply to Nate Graham from comment #3)
> Thanks for testing. Definitely sounds like an issue in Kile, then.

Can you try if you can edit and save a file with kwrite?

kwrite "/run/user/1000/gvfs/smb-share:server=mr-server,share=mr-share/_DOKUMENTATION_/MFA-datasheet/test.txt"
Comment 5 Friedrich Feichtinger 2018-01-24 08:53:50 UTC
> Can you try if you can edit and save a file with kwrite?
Yes, it works. No Issues with KWrite so far.
Comment 6 Michel Ludwig 2018-01-24 19:00:48 UTC
Well, I tried to reproduce the problem with GNOME + Samba on Fedora, but everything works fine... :/

Do you know if you have some kind of a special set-up?

Can you reproduce the problem reliably?
Comment 7 Friedrich Feichtinger 2018-01-25 13:21:57 UTC
Created attachment 110114 [details]
SAMBA config file
Comment 8 Friedrich Feichtinger 2018-01-25 13:29:32 UTC
> Do you know if you have some kind of a special set-up?
None that I know of. See the attached SAMBA config file for the server.

On the client side, the share is simply mounted using nautilus (the GNOME file browser).

> Can you reproduce the problem reliably?
Yes. Every time. I open a file on the samba share, save it again, then the file has 0 bytes.

Is there a possibility to get some additional debug output from kile? Running kile from a terminal did not produce any additional information.
Comment 9 Michel Ludwig 2018-01-25 19:52:33 UTC
Can you try out the latest version of Kile and check whether the problem also occurs there?

https://launchpad.net/~kile/+archive/ubuntu/master
Comment 10 Friedrich Feichtinger 2018-01-30 10:50:08 UTC
> Can you try out the latest version of Kile and check whether the problem also occurs there?

OK, so I tried with Kile 2.9.92 and the problem seems to be disappeared.

BTW: Really impressive how much Kile was improved since 2.1.3, good work folks!
Comment 11 Nate Graham 2018-01-30 14:24:18 UTC
Excellent news, and thanks for re-testing!