curl-library
ftp upload problems... again
Date: Mon, 21 Sep 2009 17:33:03 +0200
Hi folks!
Sorry to bother you guys again, but I'm still having one problem with ftp upload.
It works great on my test servers, but on some servers of the users of my software the upload fails.
Although, downloading files works great on their servers!
Here an example logfile (CURL_VERBOSE) of an upload that fails:
//-------------------------------------------------------------
* About to connect() to ftp.coniserver.net port 21 (#0)
* Trying 252.277.85.143... * connected
* Connected to ftp.testserver.net (252.277.85.14) port 21 (#0)
< 220 FTP Server ready. > USER anonymous < 331 Anonymous login ok, send your complete email address as your password > PASS anonymous < 230 Anonymous access granted, restrictions apply > PWD < 257 "/" is the current directory * Entry path is '/'
> EPSV * Connect data stream passively
< 229 Entering Extended Passive Mode (|||49213|) * Trying 252.277.85.14... * connected
* Connecting to 252.277.85.14 (252.277.85.14) port 49213
> TYPE I < 200 Type set to I > STOR testfile.zip < 550 testfile.zip: No such file or directory * Failed FTP upload: 550
* Remembering we are in dir ""
* Connection #0 to host ftp. testserver.net left intact
* Upload failed (at start/before it took off)
> QUIT < 221 Goodbye. * Closing connection #0
//-------------------------------------------------------------
The server has upload rights set!
I'm using curl 7.19.3 under Win 32.
This is how I set up the upload function:
//-------------------------------------------------------------
curl_easy_setopt(easyhandle,CURLOPT_READFUNCTION,ftp_read_callback);
curl_easy_setopt(easyhandle,CURLOPT_UPLOAD,1L);
curl_easy_setopt(easyhandle,CURLOPT_URL,url);
curl_easy_setopt(easyhandle,CURLOPT_USERNAME,username);
curl_easy_setopt(easyhandle,CURLOPT_PASSWORD,password);
curl_easy_setopt(easyhandle,CURLOPT_READDATA,ftp_file.stream);
curl_easy_setopt(easyhandle,CURLOPT_INFILESIZE_LARGE,(curl_off_t)ftp_file.size);
curl_easy_setopt(easyhandle,CURLOPT_NOPROGRESS,0);
curl_easy_setopt(easyhandle,CURLOPT_PROGRESSFUNCTION,ftp_progress_callback);
//-------------------------------------------------------------
Thanks for your help!
Best regards,
Peter
-- Neu: GMX Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate für nur 19,99 Euro/mtl.!* http://portal.gmx.net/de/go/dsl02Received on 2009-09-21