cURL / Mailing Lists / curl-library / Single Mail

curl-library

FTP listing

From: monkeyiq <monkeyiq_at_users.sourceforge.net>
Date: Wed, 21 Nov 2001 04:08:31 +1000

Hi,
  I am adding the ability for ferris to mount ftp sites as a filesystem
using libcurl (7.9.1). I am having problems getting a ftp LIST.

If I just insert the URL
ftp://host//
then I get a nice connection
* Entry path is '/'
* Connected to host (x.x.x.x)
> PASV
< 227 Entering Passive Mode (xxx)
* Connecting to host (x,x,x,x) port 63355
* Connected the data stream!
> TYPE A
< 200 Type set to A.
> LIST
< 150 Opening ASCII mode data connection for directory listing.
* Getting file with size: -1
FerrisCurlState_write_cb() totalsize:249
FerrisCurlState_write_cb() ptr:total 0
d--x--x--x 2 root root 87 Nov 3 03:19 bin
d--x--x--x 2 root root 66 Nov 2 11:19 etc
drwxr-xr-x 2 root root 69 May 1 2001 lib
drwxr-xr-x 2 root 50 114 Nov 20 17:08 pub

< 226 Transfer complete.

Which is all cool, but when I try using a QUOTE command of
LIST -la
or
PASV
LIST -l

then I get big problems. The PASV seems to hang because I have
switched to pasive mode, not curl. and the LIST -l

< 257 "/" is current directory.
* Entry path is '/'
* Connected to host ()
> LIST -l
< 425 Can't build data connection: Connection refused.
ls.cpp cought:CurlPerformFailed, 525:libcurl.cpp Ferris::FerrisCurlState &Ferris::FerrisCurlClass::operator() (Ferris::FerrisCurlState &)curl_easy_perform() failed:QUOT string not accepted: LIST -l return code:21
* Closing connection #0

note that libcurl.cpp is my curl module.

Is there a way to tell curl what arguments you want for the
LIST command? or to be able to switch to PASV before a QUOTE?

-- 
-----------------------------------------------------
http://witme.sourceforge.net/libferris.web/index.html
Received on 2001-11-20