gvfsd-sftp: unable to append to file when using low-level writing (echo)

Bug #517033 reported by potter000
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
gvfs
Fix Released
Medium
gvfs (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: gvfs

Configuration:
Ubuntu 9.10 Karmic
GNOME 2.28.0
gvfs 1.4.2 (tried building 1.5.1 - same result)

Steps to reproduce behaviour:
1. Mount a GVFS-SFTP share (via sftp://someserver)
2. Open terminal and cd to this share
3. Run commands:
user@host:~/.gvfs/sftp on someserver$ echo 100 > ./test
user@host:~/.gvfs/sftp on someserver$ echo 200 >> ./test
4. Expected result:
"200" appended to file contents
5. Real result - an error:
bash: echo: write error: Operation not supported

Additional information:
When using a text editor writing with fopen (e.g. Geany:
http://www.geany.org), all file contents is lost after saving the file. When using gedit (which seems to write via
g_file_set_contents), all is OK.
I have already filed a bug to the GNOME team (https://bugzilla.gnome.org/show_bug.cgi?id=608910) and a similar bug about gvfsd-smb (https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/517028).
This behaviour is not reproducible with Ubuntu Jaunty (GNOME 2.26, gvfs 1.2.2), all is OK there.

Revision history for this message
Pedro Villavicencio (pedro) wrote :

Thanks for the report, linking the upstream one and marking this as triaged.

Changed in gvfs (Ubuntu):
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
importance: Undecided → Low
status: New → Triaged
Changed in gvfs:
importance: Unknown → Medium
status: Unknown → New
Revision history for this message
Nathaniel W. Turner (nturner) wrote :

This bug causes permanent data loss with no warning.
How is it possibly "Importance: Low"?
If we can't SFTP with gvfs, it should be disabled. A feature that eats your data is worse than no feature at all.

tags: added: precise
Revision history for this message
Nathaniel W. Turner (nturner) wrote :

That should read "If we can't fix SFTP with gvfs ..."

Also:
When editing files with vim over gvfs/sftp, the whole file is lost upon saving.
When editing files with LibreOffice Calc over gvfs/sftp, the existing files gets corrupted such that LibreOffice can no longer open it.

This is with Ubuntu 12.04.

Changed in gvfs:
status: New → Fix Released
Revision history for this message
Sebastien Bacher (seb128) wrote :
Changed in gvfs (Ubuntu):
assignee: Ubuntu Desktop Bugs (desktop-bugs) → nobody
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gvfs - 1.19.2-0ubuntu1

---------------
gvfs (1.19.2-0ubuntu1) trusty; urgency=low

  * New upstream release.
    - smb: Fix "write file error: Success". (LP: #490176)
    - sftp: unable to append to file when using low-level writing
      (LP: #517033)
    - http: Fix uninitialized GError (LP: #1210852)
  * Adjust libsoup-gnome2.4-dev → libsoup2.4-dev build dependency, as per
    upstream configure.ac.
  * Drop 00upstream_mtp_test_updates.patch, included upstream.
 -- Martin Pitt <email address hidden> Mon, 25 Nov 2013 11:05:01 +0100

Changed in gvfs (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.