[chef] Re: RE: Re: remote_file resource for FTP with username and password


Chronological Thread 
  • From: Lamont Granquist < >
  • To:
  • Cc: Kapil Shardha < >
  • Subject: [chef] Re: RE: Re: remote_file resource for FTP with username and password
  • Date: Wed, 12 Mar 2014 11:45:37 -0700


The Chef error is just being rethrown because URI.parse() in ruby can't handle those URIs and I just tested on ruby-2.1.1 and that class still doesn't know how to deal with AD domain users in FTP urls. It looks like it would be possible to extend remote_file to take "username" and "password" attributes and pass those into the remote_file FTP downloader class and use those instead of trying to extract the user + pass out of the URI. Right now the username and password look like they have to come from the URI though so its not possible to use usernames and passwords that ruby cannot parse. You should look for an open chef ticket on this or open a new one up if you can't find one.

On Wed Mar 12 10:47:26 2014, Kapil Shardha wrote:
I tried that. In my case, the user account is a domain account so this
is how my resource looks like

remote_file "Download Install File" do

            source
"ftp://domain\\user: //install.exe"

            path "C:\\Temp\\install.exe"

end

It does not like the value of source attribute. I also tried using

 
<mailto: >
 format too but chef-client
resulted in same error.

Following is the error:

FATAL: Chef::Exceptions::InvalidRemoteFileURI: <URI> is not a valid
source parameter for remote_file. Source must be an absolute URI or an
array of URIs.

Thanks

-Kapil

*From:*Sölvi Páll Ásgeirsson 
[mailto:
*Sent:* Tuesday, March 11, 2014 4:26 PM
*To:* 

*Subject:* [chef] Re: remote_file resource for FTP with username and
password

Hi

It looks like it
(https://github.com/opscode/chef/blob/master/lib/chef/provider/remote_file/ftp.rb
and
https://github.com/opscode/chef/blob/master/lib/chef/provider/remote_file/content.rb)

Have you tried setting the uri to 
"ftp://USER: "
 ?

Sölvi

On Tue, Mar 11, 2014 at 5:57 PM, Kapil Shardha
<
<mailto: >>
 wrote:

    All,

    I checked the documentation for *remote_file* resource but could
    not find if there is a way to define attributes for FTP username
    and password. Any idea if that is supported?

    Thanks

    -Kapil

    ------------------------------------------------------------------------


    This email and any accompanying documents may contain privileged
    or otherwise confidential information of, and/or is the property
    of Education Management Solutions, Inc. If you are not the
    intended recipient, please immediately advise the sender by reply
    email & delete the message & any attachments without using,
    copying or disclosing the contents. Thank you.


------------------------------------------------------------------------

This email and any accompanying documents may contain privileged or
otherwise confidential information of, and/or is the property of
Education Management Solutions, Inc. If you are not the intended
recipient, please immediately advise the sender by reply email &
delete the message & any attachments without using, copying or
disclosing the contents. Thank you.





Archive powered by MHonArc 2.6.16.

§