GNOME Bugzilla – Bug 312343
Can't copy directories on FTP servers
Last modified: 2006-01-18 22:36:52 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:
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?
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
You'll also have to pass the password: ftp://xbox:password@xbox/E/Apps/B
Sure, sorry. Output: Failed to copy ftp://[...]/A to ftp://[...]/B Reason: Access denied
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.
"that a" should have been "a painful"
Created attachment 51734 [details] gnomevfs-copy output Output attached
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?
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.
Thanks for your efforts! Updating bug status... .
Reassigning to gnome-vfs.
*** Bug 322631 has been marked as a duplicate of this bug. ***
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?
*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.
It's better than I was expecting, with the fix from #45007 it definitely works. Directories are now copied.