cURL / Mailing Lists / curl-library / Single Mail

curl-library

Odd behaviour for CWD and CURLFTPMETHOD_MULTICWD

From: Mehmet Bozkurt <mehmet.bozkurt_at_xware.se>
Date: Thu, 26 Aug 2010 09:06:59 +0200

Hi!

I have an FTP server which presents a virtual file system to a user on
login.
The home directory for a user when he/she logs in is "/ftp/ftpdbg"
Doing "cd .." will not be allowed from this position. But moving to
directories below this position will work.

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

MyTestContract exists. I have set CURLFTPMETHOD_MULTICWD.

If libcurl didn't do the first CWD everything would work.

< 220 FTP server ready.
> USER ftpdbg
< 331 User 'ftpdbg' OK. Please enter password.
> PASS ****
< 230-Welcome to FTP Server
< 230 Logged in as 'ftpdbg'.
> PWD
< 257 "/ftp/ftpdbg" is current directory.
* Entry path is '/ftp/ftpdbg'
* Remembering we are in dir ""
* Connection #0 to host localhost left intact
* Re-using existing connection! (#0) with host localhost
* Connected to localhost (127.0.0.1) port 21 (#0)
> CWD /ftp/ftpdbg
< 250 Command successful.
> CWD ftp
< 250 Command successful.
> CWD ftpdbg
< 550 No such file or directory.
* Server denied you to change to the given directory

Best regards,
Mehmet

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-08-26