Den 2015-08-13 kl. 11:45, skrev Patrick Monnerat:
Nils Söderman wrote:


!!! Next time you top-post, I'll stop trying to help you. Please see 
http://curl.haxx.se/mail/etiquette.html#Do_Not_Top_Post and comply !!!

I begin to a bit desperate now, are there no debug/error printf() possible? ( I 
use -Wall ...)
You should use CURLOPT_VERBOSE option 
(http://curl.haxx.se/libcurl/c/CURLOPT_VERBOSE.html) and examine the protocol 
dialog traced at execution time. This will give you some hints about what's 
wrong and the output will give us some more information about the problem if 
you paste it into your question e-mail.

Patrick

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Thanks again Patrick, my most humbly apology. I did not realize my error until I sent my last missive. Used my usual way with email... Old dogs etc. And thanks for the verbose tip! I like to see whats going on, since I debugged Z80 in the seventies. So, is it wrong to change name of the file for transport up to the archive? Why, if so, is the program listing:

#define LOCAL_FILE      "/home/pi/Counter/temp/ws_data.txt"
#define UPLOAD_FILE_AS  "ws_data2.txt"
#define REMOTE_URL"ftp://192.168.0.151/backup/ftptest/";  UPLOAD_FILE_AS
#define RENAME_FILE_TO  "ws_data3.txt"

Please tell me where I am stupid (beside other places...)
Nils
pi@VallrunElmeter ~/Counter $ sudo ./ftpupload 
Local file size: 99 bytes.
* About to connect() to 192.168.0.151 port 21 (#0)
*   Trying 192.168.0.151...
* connected
* Connected to 192.168.0.151 (192.168.0.151) port 21 (#0)
* FTP 0x90d3f0 state change from STOP to WAIT220
< 220 ProFTPD 1.3.3g Server (NETGEAR ReadyNAS) [192.168.0.151]
> USER anonymous
* FTP 0x90d3f0 state change from WAIT220 to USER
< 331 Anonymous login ok, send your complete email address as your password
> PASS [email protected]
* FTP 0x90d3f0 state change from USER to PASS
< 230 Anonymous access granted, restrictions apply
> PWD
* FTP 0x90d3f0 state change from PASS to PWD
< 257 "/" is the current directory
* Entry path is '/'
* FTP 0x90d3f0 state change from PWD to STOP
* protocol connect phase DONE
* DO phase starts
> CWD backup
* FTP 0x90d3f0 state change from STOP to CWD
< 250 CWD command successful
> CWD ftptest
< 250 CWD command successful
> EPSV
* FTP 0x90d3f0 state change from CWD to PASV
* Connect data stream passively
< 229 Entering Extended Passive Mode (|||65234|)
*   Trying 192.168.0.151...
* connected
* Connecting to 192.168.0.151 (192.168.0.151) port 65234
* FTP 0x90d3f0 state change from PASV to STOP
* DO phase is complete
> TYPE I
* FTP 0x90d3f0 state change from STOP to STOR_TYPE
< 200 Type set to I
> STOR ws_data2.txt
* FTP 0x90d3f0 state change from STOR_TYPE to STOR
< 550 ws_data2.txt: Permission denied
* Failed FTP upload: 550
* DO-MORE phase ends with 25
* Remembering we are in dir "backup/ftptest/"
* Uploaded unaligned file size (0 out of 99 bytes)
* Connection #0 to host 192.168.0.151 left intact
* Upload failed (at start/before it took off)
curl_easy_perform ()  failed: Upload failed (at start/before it took off)
> QUIT
* FTP 0x90d3f0 state change from STOR to QUIT
< 221 Goodbye.
* FTP 0x90d3f0 state change from QUIT to STOP
* Closing connection #0
pi@VallrunElmeter ~/Counter $ 
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to