nwphelps
28th June 2005 21:28 UTC
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?
ElvenProgrammer
28th June 2005 21:44 UTC
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?
Afrow UK
28th June 2005 23:11 UTC
What does your code look like (minues the user name and password of course :))
-Stu
nwphelps
28th June 2005 23:21 UTC
!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.
Takhir
29th June 2005 07:11 UTC
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).
nwphelps
29th June 2005 07:30 UTC
That was it Takhir! Thank you!