Archive: InetLoad FTP with Auth?


InetLoad FTP with Auth?
I have used InetLoad with lots of success for HTTP, however, I've run into a problem with FTP when using embedded authorization. I.E. ftp://username:pw@somehost.com/myfile.zip

I'm assuming this type of syntax is not supported. Can anyone confirm this? And if so, is there any way to do FTP that requires authorization?


For server (http/ftp) authentication it is possible
to use URL encoded name and password, for example http://username:password@nsis.sourceforge.net
So I guess it is meant to work, maybe we have a bug here?

What does your code look like (minues the user name and password of course :))

-Stu


!define DOWNLOAD_URL "ftp://myusername:mypassword@ftp.myco.com/myfile.zip"

DownloadFile:
InetLoad::load "${DOWNLOAD_URL}" "$TEMP\myfile.zip"
Pop $0
StrCmp $0 "OK" Finish Error

Error:
MessageBox MB_RETRYCANCEL|MB_ICONQUESTION|MB_DEFBUTTON1 "Download Error" /SD IDCANCEL IDRETRY DownloadFile
Abort

Finish:
Return

The above works fine when DOWNLOAD_URL is an FTP URL without credentials, but not when it includes the credentials.


If you remote server is Linux (UNIX) home folder for ftp connection may be defined for every user. Test it with full path on the remote filesystem ftp://username:pw@somehost.com/home/username/myfile.zip
(Retested with Linux and Free BSD - works fine in my LAN).


That was it Takhir! Thank you!