curl not uploading file to ftp

2

1

I am using curl to upload a file to ftp server. The same script is working on another system, but on this one after connecting to ftp it is not doing anything and connection times out. The detailed output with -v options is as follows:

curl -v -# -T live_mc.sql ftp://userid:pwd@myserver.dyndns.biz/rdirc/
* About to connect() to myserver.dyndns.biz port 21 (#0)
*   Trying xxx.xxx.xxx.xx... connected
* Connected to myserver.dyndns.biz (96.55.199.63) port 21 (#0)
< 220-FileZilla Server version 0.9.37 beta
< 220-written by Tim Kosse (Tim.Kosse@gmx.de)
< 220 Please visit http://sourceforge.net/projects/filezilla/
> USER userid
< 331 Password required for userid
> PASS pwd
< 230 Logged on
> PWD
< 257 "/" is current directory.
* Entry path is '/'
> CWD rdirc
< 250 CWD successful. "/rdirc" is current directory.
> EPSV
* Connect data stream passively
< 229 Entering Extended Passive Mode (|||3271|)
*   Trying xxx.xxx.xxx.xx...

I have also tried --upload-file, --user options but no success. Please help to figure out what is wrong.

TheVillageIdiot

Posted 2011-06-20T06:39:01.770

Reputation: 1 187

Answers

5

solved this with

--no-epsv

option :D

TheVillageIdiot

Posted 2011-06-20T06:39:01.770

Reputation: 1 187

0

Thanks, @TheVillageIdiot, for sharing this info. I have been researching a lot untill I found this "--no-epsv" method, so I wanna report to anyone interested that it makes CURL working from inside a virtual machine (I have tested it with Linux VM running inside a Windows 7 host), at least for sending files:

curl -u "myuser:mypassword" --upload-file MyFile.txt ftp://ftp.phpnet.us/htdocs/Test --no-epsv

Sopalajo de Arrierez

Posted 2011-06-20T06:39:01.770

Reputation: 5 328