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 0x1d49430 state change from STOP to WAIT220 < 220 ProFTPD 1.3.3g Server (NETGEAR ReadyNAS) [192.168.0.151] > USER anonymous * FTP 0x1d49430 state change from WAIT220 to USER < 331 Anonymous login ok, send your complete email address as your password > PASS WS_DATA1 * FTP 0x1d49430 state change from USER to PASS < 230 Anonymous access granted, restrictions apply > PWD * FTP 0x1d49430 state change from PASS to PWD < 257 "/" is the current directory * Entry path is '/' * FTP 0x1d49430 state change from PWD to STOP * protocol connect phase DONE * DO phase starts > CWD WS_DATA * FTP 0x1d49430 state change from STOP to CWD < 250 CWD command successful > EPSV * FTP 0x1d49430 state change from CWD to PASV * Connect data stream passively < 229 Entering Extended Passive Mode (|||33440|) * Trying 192.168.0.151... * connected * Connecting to 192.168.0.151 (192.168.0.151) port 33440 * FTP 0x1d49430 state change from PASV to STOP * DO phase is complete > TYPE I * FTP 0x1d49430 state change from STOP to STOR_TYPE < 200 Type set to I > STOR ws_data2.txt * FTP 0x1d49430 state change from STOR_TYPE to STOR < 150 Opening BINARY mode data connection for ws_data2.txt * FTP 0x1d49430 state change from STOR to STOP * DO-MORE phase ends with 0 *** We read 99 bytes from file * We are completely uploaded and fine * Remembering we are in dir "WS_DATA/" < 226 Transfer complete > RNFR ws_data2.txt < 350 File or directory exists, ready for destination name > RNTO ws_data3.txt < 250 Rename successful > APPE ws_data.txt < 425 Unable to build data connection: Invalid argument * QUOT string not accepted: APPE ws_data.txt * Connection #0 to host 192.168.0.151 left intact * Quote command returned error curl_easy_perform () failed: Quote command returned error > QUIT * FTP 0x1d49430 state change from STOP to QUIT < 221 Goodbye. * FTP 0x1d49430 state change from QUIT to STOP * Closing connection #0