# Using remote\_file issue with file://

**URL:** <https://discourse.chef.io/t/using-remote-file-issue-with-file/6756>\
**Category:** Chef Infra (archive)\
**Created:** [July 17, 2015, 4:48pm UTC](https://discourse.chef.io/t/using-remote-file-issue-with-file/6756 "2015-07-17T16:48:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kiril\_Ilyev](https://avatars.discourse-cdn.com/v4/letter/k/bcef8e/32.png) [@Kiril\_Ilyev](https://discourse.chef.io/u/Kiril_Ilyev)\
**Post date:** [July 17, 2015, 4:48pm UTC](https://discourse.chef.io/t/using-remote-file-issue-with-file/6756/1 "2015-07-17T16:48:48Z")

</div>

Dear all,

the following snippet doesn’t seem to work properly:

default[:aem][:download\_url] = ‘file:///my/path/to/my/file.jar’

remote\_jar\_name = "aem-quickstart-#{node[:aem][:version]}.jar"  
remote\_file “#{Chef::Config[:file\_cache\_path]}/#{remote\_jar\_name}” do  
source "#{vars[:download\_url]}"  
mode "0755"  
action :create\_if\_missing  
end

Can you please advice.

Moreover when I use a [http://adress](http://adress) behind an authenticated form I can’t  
find the way to provide the username password. This issue  
[https://tickets.opscode.com/browse/CHEF-3786](https://tickets.opscode.com/browse/CHEF-3786) seems to provide this  
functionality but I can’t find how to use it.

Thanks in advance,  
Kiril

---

<div class="post-metadata">

**Author:** ![jdunn](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/jdunn/32/1800_2.png) [@jdunn](https://discourse.chef.io/u/jdunn)\
**Post date:** [July 18, 2015, 10:06pm UTC](https://discourse.chef.io/t/using-remote-file-issue-with-file/6756/2 "2015-07-18T22:06:07Z")

</div>

On Fri, Jul 17, 2015 at 12:48 PM, Kiril Ilyev [kiril.ilyev@gmail.com](mailto:kiril.ilyev@gmail.com) wrote:

> the following snippet doesn't seem to work properly:
> 
> default[:aem][:download\_url] = 'file:///my/path/to/my/file.jar'
> 
> remote\_jar\_name = "aem-quickstart-#{node[:aem][:version]}.jar"  
> remote\_file "#{Chef::Config[:file\_cache\_path]}/#{remote\_jar\_name}" do  
> source "#{vars[:download\_url]}"  
> mode "0755"  
> action :create\_if\_missing  
> end
> 
> Can you please advice.

What do you mean "doesn't work properly"? What error do you get?

> Moreover when I use a [http://adress](http://adress) behind an authenticated form I can't  
> find the way to provide the username password. This issue  
> [https://tickets.opscode.com/browse/CHEF-3786](https://tickets.opscode.com/browse/CHEF-3786) seems to provide this  
> functionality but I can't find how to use it.

DId you try [http://user:password@server.example.com/](http://user:password@server.example.com/) ?

- Julian

--  
[Julian C. Dunn [jdunn@aquezada.com](mailto:jdunn@aquezada.com) \* Sorry, I'm ]  
[WWW: [http://www.aquezada.com/staff/julian](http://www.aquezada.com/staff/julian) \* only Web 1.0 ]  
[gopher://sdf.org/1/users/keymaker/ \* compliant!]  
[PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9]

---

<div class="post-metadata">

**Author:** ![Kiril\_Ilyev](https://avatars.discourse-cdn.com/v4/letter/k/bcef8e/32.png) [@Kiril\_Ilyev](https://discourse.chef.io/u/Kiril_Ilyev)\
**Post date:** [July 20, 2015, 7:21am UTC](https://discourse.chef.io/t/using-remote-file-issue-with-file/6756/3 "2015-07-20T07:21:40Z")

</div>

Hello Julien,

> DId you try [http://user:password@server.example](http://user:password@server.example).  
> [http://user:password@server.example.com/](http://user:password@server.example.com/)

This wroked well thanks a lot.

However I am still having an issue when prefixing with file:/// instead of  
an http.

See my error below:  
I am using chef version:  
09:06 $ chef --v  
Chef Development Kit Version: 0.6.2  
chef-client version: 12.3.0  
berks version: 3.2.4  
kitchen version: 1.4.0

If i put this in my browser :  
file:///home/kiril/Documents/cq5.6-adv-dev-usb-2013-02-21/Distribution/CQ5/license.properties  
I get the file i need. So i cannot understand why chef doesn't reach it.  
The documentation says that file http & https are supported.

Thanks in advance,  
Kiril

# ==\> default: Error executing action `create` on resource 'remote\_file[/opt/aem/author/license.properties]' ==\> default:

==\> default:  
==\> default: Errno::ENOENT  
==\> default: -------------  
==\> default: No such file or directory @ rb\_sysopen -  
/home/kiril/Documents/cq5.6-adv-dev-usb-2013-02-21/Distribution/CQ5/license.properties  
==\> default:  
==\> default: Resource Declaration:  
==\> default: ---------------------  
==\> default: # In  
/tmp/vagrant-chef/ee0f6fb5916f969b009ab9295c2cdc88/cookbooks/aem/recipes/author.rb  
==\> default:  
==\> default: 31: remote\_file  
"#{node[:aem][:author][:default\_context]}/license.properties" do  
==\> default: 32: source "#{node[:aem][:license\_url]}"  
==\> default: 33: mode 0644  
==\> default: 34: end  
==\> default: 35: end  
==\> default:  
==\> default: Compiled Resource:  
==\> default: ------------------  
==\> default: # Declared in  
/tmp/vagrant-chef/ee0f6fb5916f969b009ab9295c2cdc88/cookbooks/aem/recipes/author.rb:31:in  
`from\_file'  
==\> default:  
==\> default: remote\_file("/opt/aem/author/license.properties") do  
==\> default: provider Chef::Provider::RemoteFile  
==\> default: action [:create]  
==\> default: retries 0  
==\> default: retry\_delay 2  
==\> default: default\_guard\_interpreter :default  
==\> default: path "/opt/aem/author/license.properties"  
==\> default: backup 5  
==\> default: atomic\_update true  
==\> default: source  
["file:///home/kiril/Documents/cq5.6-adv-dev-usb-2013-02-21/Distribution/CQ5/license.properties"]  
==\> default: use\_etag true  
==\> default: use\_last\_modified true  
==\> default: declared\_type :remote\_file  
==\> default: cookbook\_name :aem  
==\> default: recipe\_name "author"  
==\> default: mode 420  
==\> default: end  
==\> default:  
==\> default: [2015-07-20T07:12:22+00:00] INFO: Running queued delayed  
notifications before re-raising exception  
==\> default:  
==\> default: Running handlers:  
==\> default: [2015-07-20T07:12:22+00:00] ERROR: Running exception handlers  
==\> default: Running handlers complete  
==\> default: [2015-07-20T07:12:22+00:00] ERROR: Exception handlers complete  
==\> default: Chef Client failed. 3 resources updated in 358.642107798  
seconds  
==\> default: [2015-07-20T07:12:22+00:00] FATAL: Stacktrace dumped to  
/var/chef/cache/chef-stacktrace.out  
==\> default: [2015-07-20T07:12:22+00:00] ERROR:  
remote\_file[/opt/aem/author/license.properties] (aem::author line 31) had  
an error: Errno::ENOENT: No such file or directory @ rb\_sysopen -  
/home/kiril/Documents/cq5.6-adv-dev-usb-2013-02-21/Distribution/CQ5/license.properties  
==\> default: [2015-07-20T07:12:22+00:00] FATAL:  
Chef::Exceptions::ChildConvergeError: Chef run process exited  
unsuccessfully (exit code 1)

2015-07-19 0:06 GMT+02:00 Julian C. Dunn [jdunn@aquezada.com](mailto:jdunn@aquezada.com):

> On Fri, Jul 17, 2015 at 12:48 PM, Kiril Ilyev [kiril.ilyev@gmail.com](mailto:kiril.ilyev@gmail.com)  
> wrote:
> 
> > the following snippet doesn't seem to work properly:
> > 
> > default[:aem][:download\_url] = 'file:///my/path/to/my/file.jar'
> > 
> > remote\_jar\_name = "aem-quickstart-#{node[:aem][:version]}.jar"  
> > remote\_file "#{Chef::Config[:file\_cache\_path]}/#{remote\_jar\_name}" do  
> > source "#{vars[:download\_url]}"  
> > mode "0755"  
> > action :create\_if\_missing  
> > end
> > 
> > Can you please advice.
> 
> What do you mean "doesn't work properly"? What error do you get?
> 
> > Moreover when I use a [http://adress](http://adress) behind an authenticated form I can't  
> > find the way to provide the username password. This issue  
> > [https://tickets.opscode.com/browse/CHEF-3786](https://tickets.opscode.com/browse/CHEF-3786) seems to provide this  
> > functionality but I can't find how to use it.
> 
> DId you try [http://user:password@server.example.com/](http://user:password@server.example.com/) ?
> 
> - Julian
> 
> --  
> [Julian C. Dunn [jdunn@aquezada.com](mailto:jdunn@aquezada.com) \* Sorry, I'm ]  
> [WWW: [Julian Dunn's Blog - Commentary on media, technology, and everything in between.](http://www.aquezada.com/staff/julian) \* only Web 1.0 ]  
> [gopher://sdf.org/1/users/keymaker/ \* compliant!]  
> [PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9]

---

<div class="post-metadata">

**Author:** ![Steven\_Murawski](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/steven_murawski/32/1450_2.png) [@Steven\_Murawski](https://discourse.chef.io/u/Steven_Murawski)\
**Post date:** [July 20, 2015, 12:46pm UTC](https://discourse.chef.io/t/using-remote-file-issue-with-file/6756/4 "2015-07-20T12:46:24Z")

</div>

Does the user account chef is running as have access to the file share you  
are connecting to?

Steve  
On Jul 20, 2015 2:21 AM, "Kiril Ilyev" [kiril.ilyev@gmail.com](mailto:kiril.ilyev@gmail.com) wrote:

> Hello Julien,
> 
> > DId you try [http://user:password@server.example](http://user:password@server.example).  
> > [http://user:password@server.example.com/](http://user:password@server.example.com/)
> 
> This wroked well thanks a lot.
> 
> However I am still having an issue when prefixing with file:/// instead of  
> an http.
> 
> See my error below:  
> I am using chef version:  
> 09:06 $ chef --v  
> Chef Development Kit Version: 0.6.2  
> chef-client version: 12.3.0  
> berks version: 3.2.4  
> kitchen version: 1.4.0
> 
> If i put this in my browser :  
> file:///home/kiril/Documents/cq5.6-adv-dev-usb-2013-02-21/Distribution/CQ5/license.properties  
> I get the file i need. So i cannot understand why chef doesn't reach it.  
> The documentation says that file http & https are supported.
> 
> Thanks in advance,  
> Kiril
> 
> # ==\> default: Error executing action `create` on resource 'remote\_file[/opt/aem/author/license.properties]' ==\> default:
> 
> ==\> default:  
> ==\> default: Errno::ENOENT  
> ==\> default: -------------  
> ==\> default: No such file or directory @ rb\_sysopen -  
> /home/kiril/Documents/cq5.6-adv-dev-usb-2013-02-21/Distribution/CQ5/license.properties  
> ==\> default:  
> ==\> default: Resource Declaration:  
> ==\> default: ---------------------  
> ==\> default: # In  
> /tmp/vagrant-chef/ee0f6fb5916f969b009ab9295c2cdc88/cookbooks/aem/recipes/author.rb  
> ==\> default:  
> ==\> default: 31: remote\_file  
> "#{node[:aem][:author][:default\_context]}/license.properties" do  
> ==\> default: 32: source "#{node[:aem][:license\_url]}"  
> ==\> default: 33: mode 0644  
> ==\> default: 34: end  
> ==\> default: 35: end  
> ==\> default:  
> ==\> default: Compiled Resource:  
> ==\> default: ------------------  
> ==\> default: # Declared in  
> /tmp/vagrant-chef/ee0f6fb5916f969b009ab9295c2cdc88/cookbooks/aem/recipes/author.rb:31:in  
> `from\_file'  
> ==\> default:  
> ==\> default: remote\_file("/opt/aem/author/license.properties") do  
> ==\> default: provider Chef::Provider::RemoteFile  
> ==\> default: action [:create]  
> ==\> default: retries 0  
> ==\> default: retry\_delay 2  
> ==\> default: default\_guard\_interpreter :default  
> ==\> default: path "/opt/aem/author/license.properties"  
> ==\> default: backup 5  
> ==\> default: atomic\_update true  
> ==\> default: source  
> ["file:///home/kiril/Documents/cq5.6-adv-dev-usb-2013-02-21/Distribution/CQ5/license.properties"]  
> ==\> default: use\_etag true  
> ==\> default: use\_last\_modified true  
> ==\> default: declared\_type :remote\_file  
> ==\> default: cookbook\_name :aem  
> ==\> default: recipe\_name "author"  
> ==\> default: mode 420  
> ==\> default: end  
> ==\> default:  
> ==\> default: [2015-07-20T07:12:22+00:00] INFO: Running queued delayed  
> notifications before re-raising exception  
> ==\> default:  
> ==\> default: Running handlers:  
> ==\> default: [2015-07-20T07:12:22+00:00] ERROR: Running exception handlers  
> ==\> default: Running handlers complete  
> ==\> default: [2015-07-20T07:12:22+00:00] ERROR: Exception handlers complete  
> ==\> default: Chef Client failed. 3 resources updated in 358.642107798  
> seconds  
> ==\> default: [2015-07-20T07:12:22+00:00] FATAL: Stacktrace dumped to  
> /var/chef/cache/chef-stacktrace.out  
> ==\> default: [2015-07-20T07:12:22+00:00] ERROR:  
> remote\_file[/opt/aem/author/license.properties] (aem::author line 31) had  
> an error: Errno::ENOENT: No such file or directory @ rb\_sysopen -  
> /home/kiril/Documents/cq5.6-adv-dev-usb-2013-02-21/Distribution/CQ5/license.properties  
> ==\> default: [2015-07-20T07:12:22+00:00] FATAL:  
> Chef::Exceptions::ChildConvergeError: Chef run process exited  
> unsuccessfully (exit code 1)
> 
> 2015-07-19 0:06 GMT+02:00 Julian C. Dunn [jdunn@aquezada.com](mailto:jdunn@aquezada.com):
> 
> > On Fri, Jul 17, 2015 at 12:48 PM, Kiril Ilyev [kiril.ilyev@gmail.com](mailto:kiril.ilyev@gmail.com)  
> > wrote:
> > 
> > > the following snippet doesn't seem to work properly:
> > > 
> > > default[:aem][:download\_url] = 'file:///my/path/to/my/file.jar'
> > > 
> > > remote\_jar\_name = "aem-quickstart-#{node[:aem][:version]}.jar"  
> > > remote\_file "#{Chef::Config[:file\_cache\_path]}/#{remote\_jar\_name}" do  
> > > source "#{vars[:download\_url]}"  
> > > mode "0755"  
> > > action :create\_if\_missing  
> > > end
> > > 
> > > Can you please advice.
> > 
> > What do you mean "doesn't work properly"? What error do you get?
> > 
> > > Moreover when I use a [http://adress](http://adress) behind an authenticated form I  
> > > can't  
> > > find the way to provide the username password. This issue  
> > > [https://tickets.opscode.com/browse/CHEF-3786](https://tickets.opscode.com/browse/CHEF-3786) seems to provide this  
> > > functionality but I can't find how to use it.
> > 
> > DId you try [http://user:password@server.example.com/](http://user:password@server.example.com/) ?
> > 
> > - Julian
> > 
> > --  
> > [Julian C. Dunn [jdunn@aquezada.com](mailto:jdunn@aquezada.com) \* Sorry, I'm ]  
> > [WWW: [http://www.aquezada.com/staff/julian](http://www.aquezada.com/staff/julian) \* only Web 1.0 ]  
> > [gopher://sdf.org/1/users/keymaker/ \* compliant!]  
> > [PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9]

---

<div class="post-metadata">

**Author:** ![Kiril\_Ilyev](https://avatars.discourse-cdn.com/v4/letter/k/bcef8e/32.png) [@Kiril\_Ilyev](https://discourse.chef.io/u/Kiril_Ilyev)\
**Post date:** [July 20, 2015, 2:02pm UTC](https://discourse.chef.io/t/using-remote-file-issue-with-file/6756/5 "2015-07-20T14:02:18Z")

</div>

I am using chef on my local machine and trying to access a local folder  
under my home. Could it be that chef isn't able to read my home folder?

2015-07-20 14:46 GMT+02:00 Steve Murawski [steven.murawski@gmail.com](mailto:steven.murawski@gmail.com):

> Does the user account chef is running as have access to the file share you  
> are connecting to?
> 
> Steve  
> On Jul 20, 2015 2:21 AM, "Kiril Ilyev" [kiril.ilyev@gmail.com](mailto:kiril.ilyev@gmail.com) wrote:
> 
> > Hello Julien,
> > 
> > > DId you try [http://user:password@server.example](http://user:password@server.example).  
> > > [http://user:password@server.example.com/](http://user:password@server.example.com/)
> > 
> > This wroked well thanks a lot.
> > 
> > However I am still having an issue when prefixing with file:/// instead  
> > of an http.
> > 
> > See my error below:  
> > I am using chef version:  
> > 09:06 $ chef --v  
> > Chef Development Kit Version: 0.6.2  
> > chef-client version: 12.3.0  
> > berks version: 3.2.4  
> > kitchen version: 1.4.0
> > 
> > If i put this in my browser :  
> > file:///home/kiril/Documents/cq5.6-adv-dev-usb-2013-02-21/Distribution/CQ5/license.properties  
> > I get the file i need. So i cannot understand why chef doesn't reach it.  
> > The documentation says that file http & https are supported.
> > 
> > Thanks in advance,  
> > Kiril
> > 
> > # ==\> default: Error executing action `create` on resource 'remote\_file[/opt/aem/author/license.properties]' ==\> default:
> > 
> > ==\> default:  
> > ==\> default: Errno::ENOENT  
> > ==\> default: -------------  
> > ==\> default: No such file or directory @ rb\_sysopen -  
> > /home/kiril/Documents/cq5.6-adv-dev-usb-2013-02-21/Distribution/CQ5/license.properties  
> > ==\> default:  
> > ==\> default: Resource Declaration:  
> > ==\> default: ---------------------  
> > ==\> default: # In  
> > /tmp/vagrant-chef/ee0f6fb5916f969b009ab9295c2cdc88/cookbooks/aem/recipes/author.rb  
> > ==\> default:  
> > ==\> default: 31: remote\_file  
> > "#{node[:aem][:author][:default\_context]}/license.properties" do  
> > ==\> default: 32: source "#{node[:aem][:license\_url]}"  
> > ==\> default: 33: mode 0644  
> > ==\> default: 34: end  
> > ==\> default: 35: end  
> > ==\> default:  
> > ==\> default: Compiled Resource:  
> > ==\> default: ------------------  
> > ==\> default: # Declared in  
> > /tmp/vagrant-chef/ee0f6fb5916f969b009ab9295c2cdc88/cookbooks/aem/recipes/author.rb:31:in  
> > `from\_file'  
> > ==\> default:  
> > ==\> default: remote\_file("/opt/aem/author/license.properties") do  
> > ==\> default: provider Chef::Provider::RemoteFile  
> > ==\> default: action [:create]  
> > ==\> default: retries 0  
> > ==\> default: retry\_delay 2  
> > ==\> default: default\_guard\_interpreter :default  
> > ==\> default: path "/opt/aem/author/license.properties"  
> > ==\> default: backup 5  
> > ==\> default: atomic\_update true  
> > ==\> default: source  
> > ["file:///home/kiril/Documents/cq5.6-adv-dev-usb-2013-02-21/Distribution/CQ5/license.properties"]  
> > ==\> default: use\_etag true  
> > ==\> default: use\_last\_modified true  
> > ==\> default: declared\_type :remote\_file  
> > ==\> default: cookbook\_name :aem  
> > ==\> default: recipe\_name "author"  
> > ==\> default: mode 420  
> > ==\> default: end  
> > ==\> default:  
> > ==\> default: [2015-07-20T07:12:22+00:00] INFO: Running queued delayed  
> > notifications before re-raising exception  
> > ==\> default:  
> > ==\> default: Running handlers:  
> > ==\> default: [2015-07-20T07:12:22+00:00] ERROR: Running exception handlers  
> > ==\> default: Running handlers complete  
> > ==\> default: [2015-07-20T07:12:22+00:00] ERROR: Exception handlers  
> > complete  
> > ==\> default: Chef Client failed. 3 resources updated in 358.642107798  
> > seconds  
> > ==\> default: [2015-07-20T07:12:22+00:00] FATAL: Stacktrace dumped to  
> > /var/chef/cache/chef-stacktrace.out  
> > ==\> default: [2015-07-20T07:12:22+00:00] ERROR:  
> > remote\_file[/opt/aem/author/license.properties] (aem::author line 31) had  
> > an error: Errno::ENOENT: No such file or directory @ rb\_sysopen -  
> > /home/kiril/Documents/cq5.6-adv-dev-usb-2013-02-21/Distribution/CQ5/license.properties  
> > ==\> default: [2015-07-20T07:12:22+00:00] FATAL:  
> > Chef::Exceptions::ChildConvergeError: Chef run process exited  
> > unsuccessfully (exit code 1)
> > 
> > 2015-07-19 0:06 GMT+02:00 Julian C. Dunn [jdunn@aquezada.com](mailto:jdunn@aquezada.com):
> > 
> > > On Fri, Jul 17, 2015 at 12:48 PM, Kiril Ilyev [kiril.ilyev@gmail.com](mailto:kiril.ilyev@gmail.com)  
> > > wrote:
> > > 
> > > > the following snippet doesn't seem to work properly:
> > > > 
> > > > default[:aem][:download\_url] = 'file:///my/path/to/my/file.jar'
> > > > 
> > > > remote\_jar\_name = "aem-quickstart-#{node[:aem][:version]}.jar"  
> > > > remote\_file "#{Chef::Config[:file\_cache\_path]}/#{remote\_jar\_name}" do  
> > > > source "#{vars[:download\_url]}"  
> > > > mode "0755"  
> > > > action :create\_if\_missing  
> > > > end
> > > > 
> > > > Can you please advice.
> > > 
> > > What do you mean "doesn't work properly"? What error do you get?
> > > 
> > > > Moreover when I use a [http://adress](http://adress) behind an authenticated form I  
> > > > can't  
> > > > find the way to provide the username password. This issue  
> > > > [https://tickets.opscode.com/browse/CHEF-3786](https://tickets.opscode.com/browse/CHEF-3786) seems to provide this  
> > > > functionality but I can't find how to use it.
> > > 
> > > DId you try [http://user:password@server.example.com/](http://user:password@server.example.com/) ?
> > > 
> > > - Julian
> > > 
> > > --  
> > > [Julian C. Dunn [jdunn@aquezada.com](mailto:jdunn@aquezada.com) \* Sorry, I'm ]  
> > > [WWW: [http://www.aquezada.com/staff/julian](http://www.aquezada.com/staff/julian) \* only Web 1.0 ]  
> > > [gopher://sdf.org/1/users/keymaker/ \* compliant!]  
> > > [PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9]

---

<div class="post-metadata">

**Author:** ![Steven\_Murawski](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/steven_murawski/32/1450_2.png) [@Steven\_Murawski](https://discourse.chef.io/u/Steven_Murawski)\
**Post date:** [July 20, 2015, 2:16pm UTC](https://discourse.chef.io/t/using-remote-file-issue-with-file/6756/6 "2015-07-20T14:16:11Z")

</div>

That totally depends on what user account you are running Chef as. Chef will have the rights of the account it runs as. If that account doesn't have rights to your home directory or that file, then it won't be able to open it to read/copy the content to your new file location.

Steve

Steven Murawski  
Community Software Development Engineer @ Chef  
Microsoft MVP - PowerShell  
[http://stevenmurawski.com](http://stevenmurawski.com) [[http://stevenmurawski.com/](http://stevenmurawski.com/)]  
On 7/20/2015 9:02:36 AM, Kiril Ilyev [kiril.ilyev@gmail.com](mailto:kiril.ilyev@gmail.com) wrote:  
I am using chef on my local machine and trying to access a local folder under my home. Could it be that chef isn't able to read my home folder?

2015-07-20 14:46 GMT+02:00 Steve Murawski \<[steven.murawski@gmail.com](mailto:steven.murawski@gmail.com) [[mailto:steven.murawski@gmail.com](mailto:steven.murawski@gmail.com)]\>:

Does the user account chef is running as have access to the file share you are connecting to?  
Steve  
On Jul 20, 2015 2:21 AM, "Kiril Ilyev" \<[kiril.ilyev@gmail.com](mailto:kiril.ilyev@gmail.com) [[mailto:kiril.ilyev@gmail.com](mailto:kiril.ilyev@gmail.com)]\> wrote:

Hello Julien,

> DId you try [http://user:password@server.example](http://user:password@server.example). [[http://user:password@server.example.com/](http://user:password@server.example.com/)]

This wroked well thanks a lot.

However I am still having an issue when prefixing with file:/// instead of an http.

See my error below:  
I am using chef version:  
09:06 $ chef --v  
Chef Development Kit Version: 0.6.2  
chef-client version: 12.3.0  
berks version: 3.2.4  
kitchen version: 1.4.0

If i put this in my browser : file:///home/kiril/Documents/cq5.6-adv-dev-usb-2013-02-21/Distribution/CQ5/license.properties I get the file i need. So i cannot understand why chef doesn't reach it. The documentation says that file http & https are supported.

Thanks in advance,  
Kiril

==\> default: Error executing action `create` on resource 'remote\_file[/opt/aem/author/license.properties]'

==\> default: ================================================================================  
==\> default:  
==\> default: Errno::ENOENT  
==\> default: -------------  
==\> default: No such file or directory @ rb\_sysopen - /home/kiril/Documents/cq5.6-adv-dev-usb-2013-02-21/Distribution/CQ5/license.properties  
==\> default:  
==\> default: Resource Declaration:  
==\> default: ---------------------  
==\> default: # In /tmp/vagrant-chef/ee0f6fb5916f969b009ab9295c2cdc88/cookbooks/aem/recipes/author.rb  
==\> default:  
==\> default: 31: remote\_file "#{node[:aem][:author][:default\_context]}/license.properties" do  
==\> default: 32: source "#{node[:aem][:license\_url]}"  
==\> default: 33: mode 0644  
==\> default: 34: end  
==\> default: 35: end  
==\> default:  
==\> default: Compiled Resource:  
==\> default: ------------------  
==\> default: # Declared in /tmp/vagrant-chef/ee0f6fb5916f969b009ab9295c2cdc88/cookbooks/aem/recipes/author.rb:31:in `from\_file'  
==\> default:  
==\> default: remote\_file("/opt/aem/author/license.properties") do  
==\> default: provider Chef::Provider::RemoteFile  
==\> default: action [:create]  
==\> default: retries 0  
==\> default: retry\_delay 2  
==\> default: default\_guard\_interpreter :default  
==\> default: path "/opt/aem/author/license.properties"  
==\> default: backup 5  
==\> default: atomic\_update true  
==\> default: source ["file:///home/kiril/Documents/cq5.6-adv-dev-usb-2013-02-21/Distribution/CQ5/license.properties"]  
==\> default: use\_etag true  
==\> default: use\_last\_modified true  
==\> default: declared\_type :remote\_file  
==\> default: cookbook\_name :aem  
==\> default: recipe\_name "author"  
==\> default: mode 420  
==\> default: end  
==\> default:  
==\> default: [2015-07-20T07:12:22+00:00] INFO: Running queued delayed notifications before re-raising exception  
==\> default:  
==\> default: Running handlers:  
==\> default: [2015-07-20T07:12:22+00:00] ERROR: Running exception handlers  
==\> default: Running handlers complete  
==\> default: [2015-07-20T07:12:22+00:00] ERROR: Exception handlers complete  
==\> default: Chef Client failed. 3 resources updated in 358.642107798 seconds  
==\> default: [2015-07-20T07:12:22+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out  
==\> default: [2015-07-20T07:12:22+00:00] ERROR: remote\_file[/opt/aem/author/license.properties] (aem::author line 31) had an error: Errno::ENOENT: No such file or directory @ rb\_sysopen - /home/kiril/Documents/cq5.6-adv-dev-usb-2013-02-21/Distribution/CQ5/license.properties  
==\> default: [2015-07-20T07:12:22+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

2015-07-19 0:06 GMT+02:00 Julian C. Dunn \<[jdunn@aquezada.com](mailto:jdunn@aquezada.com) [[mailto:jdunn@aquezada.com](mailto:jdunn@aquezada.com)]\>:

On Fri, Jul 17, 2015 at 12:48 PM, Kiril Ilyev \<[kiril.ilyev@gmail.com](mailto:kiril.ilyev@gmail.com) [[mailto:kiril.ilyev@gmail.com](mailto:kiril.ilyev@gmail.com)]\> wrote:

> the following snippet doesn't seem to work properly:
> 
> default[:aem][:download\_url] = 'file:///my/path/to/my/file.jar'
> 
> remote\_jar\_name = "aem-quickstart-#{node[:aem][:version]}.jar"  
> remote\_file "#{Chef::Config[:file\_cache\_path]}/#{remote\_jar\_name}" do  
> source "#{vars[:download\_url]}"  
> mode "0755"  
> action :create\_if\_missing  
> end
> 
> Can you please advice.

What do you mean "doesn't work properly"? What error do you get?

> Moreover when I use a [http://adress](http://adress) [[http://adress](http://adress)] behind an authenticated form I can't  
> find the way to provide the username password. This issue  
> [https://tickets.opscode.com/browse/CHEF-3786](https://tickets.opscode.com/browse/CHEF-3786) [[https://tickets.opscode.com/browse/CHEF-3786](https://tickets.opscode.com/browse/CHEF-3786)] seems to provide this  
> functionality but I can't find how to use it.

DId you try [http://user:password@server.example.com/](http://user:password@server.example.com/) [[http://user:password@server.example.com/](http://user:password@server.example.com/)] ?

- Julian

--  
[Julian C. Dunn \<[jdunn@aquezada.com](mailto:jdunn@aquezada.com) [[mailto:jdunn@aquezada.com](mailto:jdunn@aquezada.com)]\> \* Sorry, I'm ]  
[WWW: [http://www.aquezada.com/staff/julian](http://www.aquezada.com/staff/julian) [[http://www.aquezada.com/staff/julian](http://www.aquezada.com/staff/julian)] \* only Web 1.0 ]  
[gopher://sdf.org/1/users/keymaker/ [[http://sdf.org/1/users/keymaker/](http://sdf.org/1/users/keymaker/)] \* compliant! ]  
[PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9]
