cURL / Mailing Lists / curl-library / Single Mail


Re: Odd behaviour for CWD and CURLFTPMETHOD_MULTICWD

From: Daniel Stenberg <>
Date: Thu, 26 Aug 2010 19:07:04 +0200 (CEST)

On Thu, 26 Aug 2010, Mehmet Bozkurt wrote:

> My question is why libcurl tries to do the following:
> ...
> CWD /ftp/ftpdbg
> ...
> CWD ftp
> ...
> CWD ftpdbg
> Only one of these dirs exist and the second causes an error.
> See listing below.
> I am trying to upload a file to:
> ftp://localhost/ftp/ftpdbg/MyTestContract/remote.txt

What libcurl version?

Further, your output shows the output from two requests, one that first
connects and completes and then the subsequent that fails. Can you show us the
full URLs you used for both requests?

> * Entry path is '/ftp/ftpdbg'
> * Remembering we are in dir ""

> * Connected to localhost ( port 21 (#0)
>> CWD /ftp/ftpdbg

The initial CWD to the "Entry path" happens when libcurl determines that you
don't want to use the same directory as immediately before - and the new path
you've given is relative the entry path. It then switches back first, to then
CWD to the requested directory.

Perhaps you can give us a full example against a public FTP site or something
that repeats the problem?

List admin:
Received on 2010-08-26