0

I am uploading data from a hosting server to an FTP server. There are many folders inside the main folder that I'm trying to send via FTP. put/wput won't work for me because they only handle individual files. I am now trying lftp but I am getting the following issue:

lftp -e "mirror -R /root/temp/mail  /mail1" -u user,pass dest_ip
Getting directory contents (0) [Making data connection...]

It stays at "Making data connection..." but meanwhile it creates the mail folder on my FTP server.

How can I upload all of my folders and files to the FTP server?

1
  • Let me guess: your remote FTP server is Pureftp
    – Wesley
    Mar 30, 2012 at 18:14

2 Answers 2

5

You're likely hung in an SSL negotation. Add set ftp:ssl-allow off to either your individual command or your ~/.lftprc file. E.g.

lftp -e "set ftp:ssl-allow off; mirror -R /root/temp/mail /mail1" -u user,pass dest_ip

If you set it in your config, just know that you're keeping yourself from using any SSL encryption security features that might be on the remote host (HAW HAW HAW).

Bonus Answer: scp(1)

3
  • 2
    +1 for the Bonus Answer. FTP must DIE! :)
    – EEAA
    Mar 30, 2012 at 18:45
  • Thanks. this solution is working. actually ssh port is disabled and i cudn't use scp so only solution was to find recursive ftp upload.
    – Kashif
    Mar 30, 2012 at 18:48
  • @user115079 Glad to hear it's working. Don't forget to mark this as the answer when the option becomes available. It'll help future readers.
    – Wesley
    Mar 30, 2012 at 19:13
0

ncftpput supports recursive directory upload. I have used it in the past but it has been a while. check the current manual for syntax and usage.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .