downloading file from ftp server via wget fails

2019-07-25 21:38发布

问题:

I am downloading a file from an FTP server using wget. If I type in

ftp://username:password@datatransfer.cj.com/some_path/file

into my browser, the file is downloaded fine.

If I instead do,

wget ftp://username:password@datatransfer.cj.com/some_path/file -O /path/file.txt

It says login incorrect.

What are some possible reasons this may occur and how can I fix it.

Thanks!

回答1:

Turns out you need to hex encode special characters in the password if sending the request with wget.

I found this from the following page:

https://www.smartftp.com/support/kb/url-that-contains-in-password-f187.html



标签: linux ftp wget