FTP synch broken?
Chris Wilson <[email protected]>
| Newsgroups | gmane.comp.web.sitecopy |
|---|---|
| Message-ID | <[email protected]> |
Hi all,
I'm just starting to try to use Sitecopy, so please forgive any mistakes
I've made. I'm trying to download my existing website to a local
directory, so that I can edit it and upload again.
I get the following error on Fetch:
chris@gcc(sitecopy-chris)$ sitecopy --fetch qwirx -d ftp
sitecopy: Fetching site `qwirx' (on ftp.qwirx.com in /html/)
Opening socket to port 21
< 220 (vsFTPd 1.2.1)
FTP: Sending 'USER xxxxxxxx':
> USER xxxxxxxx
< 331 Please specify the password.
FTP: Sending PASS command...
> PASS xxxxxxxx
< 230 Login successful.
> PASV
< 227 Entering Passive Mode (193,115,249,22,209,203)
ftp: Parsed PASV response, using port 53707
> LIST -laR /html/
< 150 Here comes the directory listing.
ls: init, topdir: [/html]
ls: [drwxr-xr-x 15 1019 502 4096 Oct 23 15:59 .]
ls: [drwxr-xr-x 7 1019 502 4096 Dec 14 2003 ..]
ls: [drwxr-xr-x 7 1019 502 4096 Mar 10 2004 .svn]
ls: directory (755): /html/.svn
...
ls: [-rw-r--r-- 1 1019 502 285 Oct 23 15:59 test.php]
ls: file (644, 285): [/html/test.php]
Fetch finished successfully.
Closing DTP connection...
< 226 Directory send OK.
File: /html//html/test.php
Getting modtime.
> MDTM /html//html/test.php
< 550 Could not get file modification time.
Didn't get modtime.
> QUIT
< 221 Goodbye.
sitecopy: Failed to fetch file listing for site `qwirx':
sitecopy: 550 Could not get file modification time.
It looks like Sitecopy doesn't like the remote directory to be anything
other than the root, since whatever path you use is repeated twice.
I tried to fix it in two different ways in the source, by not prepending
the root directory to the MTDM command in ftp.c (but absolute paths are
still stored in the file list), and by removing the root directory from
the current directory in ls_parse (in lsparser.c), so that paths in the
file list are relative to the site root.
Both changes fixed this problem, but in neither case did recursion work
properly on the site. I can get sitecopy to download all the files in the
directory that I specify as the remote root directory, but it will not
recurse into any subdirectories. I can't even see where in the synch code
it is supposed to do any recursion at all. site_synch contains only the
following:
ret = synch_create_directories(site);
if (ret == 0 || site->keep_going) {
ret = synch_files(site, session);
if (ret == 0 || site->keep_going) {
ret = synch_delete_directories(site);
}
}
which doesn't seem recursive to me.
Can anyone enlighten me about these problems?
Cheers, Chris.
--
_ ___ __ _
/ __/ / ,__(_)_ | Chris Wilson <0000 at qwirx.com> - Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Perl/SQL/HTML Developer |
\ _/_/_/_//_/___/ | We are GNU-free your mind-and your software |
_______________________________________________
sitecopy maillist - [email protected]
http://dav.lyra.org/mailman/listinfo/sitecopy