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 312343 - Can't copy directories on FTP servers
Can't copy directories on FTP servers
Status: RESOLVED FIXED
Product: gnome-vfs
Classification: Deprecated
Component: Module: ftp
2.13.x
Other All
: Normal normal
: ---
Assigned To: gnome-vfs maintainers
gnome-vfs maintainers
: 322631 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-08-02 12:23 UTC by Fabio Bonelli
Modified: 2006-01-18 22:36 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
Patch against gnomevfs-copy (2.13 KB, patch)
2005-09-02 16:02 UTC, Christian Neumair
none Details | Review
gnomevfs-copy output (5.04 KB, text/plain)
2005-09-02 17:31 UTC, Fabio Bonelli
  Details
Proposed fix for this bug (3.10 KB, patch)
2005-09-03 12:45 UTC, Fabio Bonelli
committed Details | Review

Description Fabio Bonelli 2005-08-02 12:23:58 UTC
Please describe the problem:
Nautilus gives a "Access denied" error when trying to copy a directory tree to
another directory, on FTP servers.

Steps to reproduce:
1. Connect to an FTP server
2. Dir "A" contains a tree of files an subdirectory
3. Create a new directory, "B"
4. Copy (with middle drag -> Copy here) the contents of "A" to "B"


Actual results:
The operation is stopped by the error. Copying from the FTP server to the local
disk, and then back to the FTP server works.

Expected results:


Does this happen every time?


Other information:
Comment 1 Christian Neumair 2005-09-01 23:51:03 UTC
This works as expected for me. Does it work if you invoke
"gnomevfs-cp ftp://login@myserver.com/my/A ftp://login@myserver.com/my/B"
in the command line?
Comment 2 Fabio Bonelli 2005-09-02 09:51:59 UTC
The server is an XBOX with xbmc:

gnomevfs-copy ftp://xbox@xbox/E/Apps/A ftp://xbox@xbox/E/Apps/B

Doesn't work, resulting in:
[...]
read(9, "220-Welcome to XBOX FileZilla (X"..., 4096) = 160
write(9, "USER anonymous\r\n", 16)      = 16
read(9, 0x8071ad4, 4096)                = -1 EAGAIN (Resource temporarily
unavailable)
select(10, [9], NULL, NULL, NULL)       = 1 (in [9])
read(9, "331 Password required for anonym"..., 4096) = 37
write(9, "PASS nobody@gnome.org\r\n", 23) = 23
read(9, 0x8071ad4, 4096)                = -1 EAGAIN (Resource temporarily
unavailable)
select(10, [9], NULL, NULL, NULL)       = 1 (in [9])
read(9, "530 Login or password incorrect!"..., 4096) = 34
close(9)
[...]

Ad infinitum.

By the way nautilus manages to copy an empty "A" into "B", before returning the
error.

Gnome-VFS version: 2.11.92-0ubuntu1
Comment 3 Christian Neumair 2005-09-02 11:26:15 UTC
You'll also have to pass the password:
 ftp://xbox:password@xbox/E/Apps/B
Comment 4 Fabio Bonelli 2005-09-02 14:49:43 UTC
Sure, sorry.
Output:

Failed to copy ftp://[...]/A to ftp://[...]/B
Reason: Access denied
Comment 5 Christian Neumair 2005-09-02 16:02:07 UTC
Created attachment 51726 [details] [review]
Patch against gnomevfs-copy

Thanks for your efforts!

Unfortunately, this feedback is not enough for processing this bug further.

If you don't have much free time or energy for that a procedure (instructions
below), you should wait for gnome-vfs 2.10 distro packages and tell us if this
works as expected. I suppose this issue is the same as described in bug 310061.


If you have some sparse time, I would appreciate if you could run "apt-get
source libgnomevfs2-0" in a terminal, grab the attached patch and apply it
against your source tree ("patch -p0 < attachment.cgi"), afterwards run
configure, open the programs subdirectory, and enter "make". Then, please run
./gnomevfs-copy with the parameters you used before and paste the output in
this bug report. I'm disappointed that we don't yet have a verbosity switch for
these tools.
Comment 6 Christian Neumair 2005-09-02 16:02:56 UTC
"that a" should have been "a painful"
Comment 7 Fabio Bonelli 2005-09-02 17:31:15 UTC
Created attachment 51734 [details]
gnomevfs-copy output

Output attached
Comment 8 Christian Neumair 2005-09-02 20:14:54 UTC
Thanks for taking the time.
The two callback invocations with status == 6 (GNOME_VFS_XFER_PHASE_COPYING)
probably are from copy_items and copy_directory. I think that the VFS error
comes from gnome_vfs_get_file_info_uri which is called for target_dir_uri in
copy_directory.
What permissions does ftp://xbox:xbox@192.168.1.2/E/Apps/B/NTSC-PAL have?
Comment 9 Fabio Bonelli 2005-09-03 12:45:22 UTC
Created attachment 51755 [details] [review]
Proposed fix for this bug

Seems that FileZilla doesn't like stuff like 

STOR /foo/bar/baz

The code in ftp-method.c predicted something like this, but the fix wasn't
implemented. With this patch, a CWD /foo/bar is done before STORing baz, and
everything works fine now.
Comment 10 Christian Neumair 2005-12-01 23:22:18 UTC
Thanks for your efforts! Updating bug status... .
Comment 11 Martin Wehner 2005-12-18 02:08:08 UTC
Reassigning to gnome-vfs.
Comment 12 Fabio Bonelli 2005-12-18 16:34:18 UTC
*** Bug 322631 has been marked as a duplicate of this bug. ***
Comment 13 Alexander Larsson 2006-01-11 11:46:10 UTC
I commited this with some fixes (don't release the ftp connection, and don't critical if context is NULL). Could you verify it is fixed?
Comment 14 Fabio Bonelli 2006-01-14 09:41:26 UTC
*This* bug is fixed, but directory aren't copied. :-) I counted other 3/4 bugs (introduced recently, I presume) that prevent the copy, I'm going to investigate further and file them with their corrections.
Comment 15 Fabio Bonelli 2006-01-18 22:36:52 UTC
It's better than I was expecting, with the fix from #45007 it definitely works. Directories are now copied.