Hi,
I am transferring tar file using cookbook.i have no username and password for my ftp server so how to login and transfer using cookbook :
my code is here:
#!/usr/bin/ruby
require ‘net/ftp’
Login to the FTP server
ftp = Net::FTP.new(node[‘ip_address’])
ftp.login
ftp.chdir(node[‘source_directory’])
ftp.getbinaryfile(node[‘package_name’], node[‘dest_directory’])
ftp.close
I ve also tried by passing credentials as nil to user and pwd but it too doesnot works.
it shows
Net::FTPPermError
172.16.1.121 530 Login incorrect.
172.16.1.121
Thanks,
indra