I am having trouble with net/ftp connecting to a windows 2008 server
setup with FTP 7.0 hostname support. In order to login the hostname must
precede the username with a pipe “|” in this fashion:
ftp://ftp.host.com|username:[email protected]/
I have tested the connection with other clients and it works
successfully but when using net/ftp in ruby the connection just stalls.
Has anyone experienced this or no of a workaround?
Thanks
-Brad
require ‘net/ftp’
URL=“ftp.host.com”
username=“ftp.host.com|username”
password=“password”
directory=“/”
ftp=Net::FTP.new
ftp.connect(URL,21)
ftp.login(username,password)
ftp.chdir(directory)
myfiles = ftp.nlst
ftp.close
puts myfiles.inspect