[chef] ftp without credentials


Chronological Thread 
  • From: Indra k < >
  • To: " " < >
  • Subject: [chef] ftp without credentials
  • Date: Mon, 7 Jul 2014 15:06:04 +0800

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




Archive powered by MHonArc 2.6.16.

§