After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 585992 - Copying files to FTP server via Fuse fails if the file doesn't exist already
Copying files to FTP server via Fuse fails if the file doesn't exist already
Status: RESOLVED DUPLICATE of bug 574968
Product: gvfs
Classification: Core
Component: ftp backend
1.2.x
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2009-06-16 14:45 UTC by Enrico Tröger
Modified: 2009-06-18 14:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Example of copying a file via "cp" to a FTP server (29.21 KB, image/png)
2009-06-16 14:46 UTC, Enrico Tröger
Details
Debug log of bplaced.net (9.83 KB, text/plain)
2009-06-17 11:13 UTC, Enrico Tröger
Details
Debug log of vsftpd (8.50 KB, text/plain)
2009-06-17 11:16 UTC, Enrico Tröger
Details

Description Enrico Tröger 2009-06-16 14:45:47 UTC
When I copy a file to a FTP server, the file is created with 0 bytes on the server and I get an error "No such file or directory".
On a second attempt to copy the file, it works fine.

This happens when the target file does not yet exist on the FTP server. And it only happens when using FUSE.

Tested with GVfs 1.2.3.

And it happens only with some FTP servers. While testing, I used a test account on www.bplaced.net where the bug occurs. To verify, I tested it with a local vsftpd server where it works as expected.
Not sure what FTP server is running on bplaced.net, but maybe this is related.
Comment 1 Enrico Tröger 2009-06-16 14:46:54 UTC
Created attachment 136733 [details]
Example of copying a file via "cp" to a FTP server
Comment 2 Andreas Henriksson 2009-06-16 21:39:46 UTC
Hello Enrico!

Could you please provide a debug log from gvfsd-ftp ?
You could start it in a terminal by running something like "GVFS_DEBUG=1 /usr/lib/gvfs/gvfsd-ftp host=www.bplaced.net user=foo password=bar" to be able to capture the output while running the copy tests in another terminal.
Comment 3 Enrico Tröger 2009-06-17 11:12:14 UTC
Your suggested command didn't work for me as it couldn't log into the server and said: "Mount failed: Password dialogue cancelled".
Anyway, I then used
GVFS_DEBUG=1 /usr/lib/gvfs/gvfsd --replace >/tmp/gvfs.log 2>&1
and mounted the ftp connection manually which worked and gave me a lot of information in the log.

I replayed my test commands then for both, the server at bplaced (which seems to be a PureFTP server) and my private vsftpd server, both logs and command sets are attached.

Not that I know much of the FTP protocol but at least one thing seems obvious: the PureFTP server offers the EPSV feature but when GVfs tries to use it, the server says "500 Unknown command". But you probably know better what exactly this means and how it is related.
Comment 4 Enrico Tröger 2009-06-17 11:13:56 UTC
Created attachment 136821 [details]
Debug log of bplaced.net
Comment 5 Enrico Tröger 2009-06-17 11:16:17 UTC
Created attachment 136822 [details]
Debug log of vsftpd
Comment 6 Andreas Henriksson 2009-06-17 13:55:12 UTC
The EPSV error isn't a problem since gvfs falls back on PASV. I think you're seeing the problem already reported in bug #574968, which seems to be a problem in the gvfs fuse daemon (not in the ftp backend).
Comment 7 Enrico Tröger 2009-06-17 14:19:27 UTC
Yes, it really seems to be the same issue as in bug #574968.

*** This bug has been marked as a duplicate of 574968 ***
Comment 8 Peter Majmesku 2009-06-18 12:22:34 UTC
Hello,

this bug exists with Pure-FTPd FTP server with MySQL user authentication Version 1.0.21-11.4. I hope this helps.

Best regards from germany,
Peter Majmesku
Comment 9 Andreas Henriksson 2009-06-18 13:47:23 UTC
The bug exists on all ftp server implementations, it's a client side bug. Pure-FTPd just makes it more visible by giving currently-uploading files a temporary name until they are done. Even on other ftp server implementations you'll see the file having the wrong size though, since the fuse daemon did it's "stat" before the upload was finished.
Comment 10 Peter Majmesku 2009-06-18 13:56:00 UTC
How I can fix that on my System? I'm using Ubuntu 9.04 Jaunty.
Comment 11 Andreas Henriksson 2009-06-18 14:06:50 UTC
Find the bug in the fuse daemon and provide a patch, or use programs that accesses gvfs via gio (glib) instead of ~/.gvfs/. The fuse daemon (~/.gvfs/) is only for "legacy" backwards compatibility.