简体   繁体   中英

downloading file from ftp server via wget fails

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!

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM