# Errors changing file\_cache\_path using chef-client cookbook during bootstrap

**URL:** <https://discourse.chef.io/t/errors-changing-file-cache-path-using-chef-client-cookbook-during-bootstrap/5763>\
**Category:** Chef Infra (archive)\
**Created:** [September 4, 2014, 8:00am UTC](https://discourse.chef.io/t/errors-changing-file-cache-path-using-chef-client-cookbook-during-bootstrap/5763 "2014-09-04T08:00:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeppe\_Nejsum\_Madsen](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/jeppe_nejsum_madsen/32/258_2.png) [@Jeppe\_Nejsum\_Madsen](https://discourse.chef.io/u/Jeppe_Nejsum_Madsen)\
**Post date:** [September 4, 2014, 8:00am UTC](https://discourse.chef.io/t/errors-changing-file-cache-path-using-chef-client-cookbook-during-bootstrap/5763/1 "2014-09-04T08:00:24Z")

</div>

Hi

We need to change the file\_cache\_path to point to a different location, so  
I have this in my env

```
          :chef_client => {
                    :config => {
                      :file_cache_path => "D:\\chef\\cache",
                      :file_backup_path => "D:\\chef\\backup"
                    }
     },

```

I’m using the chef-client::config recipe to manage client.rb, but it seems  
the reload of the config doesn’t effect the current run, since the new  
directories are not created so a later recipe (that tries to download to  
the cache folder) fails. See output below.

The client.rb is updated to have the correct settings.

The rather strange thing is that the chef-stacktrace file is written to the  
new cache dir on the D: drive, so next time I run chef-client things are  
working…

Any hints?

/Jeppe

# 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: Processing directory[C:/chef/run] action create (chef-client::config line 77) 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: directory[C:/chef/run] created directory C:/chef/run 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: directory[C:/chef/run] owner changed to S-1-5-21-1358994766-942838864-10853432-500 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: directory[C:/chef/run] group changed to S-1-5-32-544 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: Processing directory[C:/chef/cache] action create (chef-client::config line 77) 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: directory[C:/chef/cache] owner changed to S-1-5-21-1358994766-942838864-10853432-500 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: directory[C:/chef/cache] group changed to S-1-5-32-544 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: Processing directory[C:/chef/backup] action create (chef-client::config line 77) 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: directory[C:/chef/backup] created directory C:/chef/backup 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: directory[C:/chef/backup] owner changed to S-1-5-21-1358994766-942838864-10853432-500 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: directory[C:/chef/backup] group changed to S-1-5-32-544 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: Processing directory[C:/chef/log] action create (chef-client::config line 77) 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: directory[C:/chef/log] created directory C:/chef/log 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: directory[C:/chef/log] owner changed to S-1-5-21-1358994766-942838864-10853432-500 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: directory[C:/chef/log] group changed to S-1-5-32-544 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: directory[C:/chef/log] permissions changed to [WIN-6G50U0QH101\Administrator/flags:0/mask:e0010000, BUILTIN\Administrators/flags:0/mask:a0000000] 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: Processing directory[C:/chef] action create (chef-client::config line 77) 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: directory[C:/chef] owner changed to S-1-5-21-1358994766-942838864-10853432-500 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: directory[C:/chef] group changed to S-1-5-32-544 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: Processing template[C:/chef/client.rb] action create (chef-client::config line 73) 172.27.28.220 [2014-09-04T00:09:02-07:00] INFO: template[C:/chef/client.rb] backed up to c:/chef/backup/chef/client.rb.chef-20140904000902.422562 172.27.28.220 [2014-09-04T00:09:02-07:00] INFO: template[C:/chef/client.rb] updated file contents C:/chef/client.rb 172.27.28.220 [2014-09-04T00:09:02-07:00] INFO: template[C:/chef/client.rb] owner changed to S-1-5-21-1358994766-942838864-10853432-500 172.27.28.220 [2014-09-04T00:09:02-07:00] INFO: template[C:/chef/client.rb] group changed to S-1-5-32-544 172.27.28.220 [2014-09-04T00:09:02-07:00] INFO: template[C:/chef/client.rb] permissions changed to [WIN-6G50U0QH101\Administrator/flags:0/mask:c0010000, BUILTIN\Administrators/flags:0/mask:80000000, Everyone/flags:0/mask:80000000] 172.27.28.220 [2014-09-04T00:09:02-07:00] INFO: template[C:/chef/client.rb] sending create action to ruby\_block[reload\_client\_config] (immediate) 172.27.28.220 [2014-09-04T00:09:02-07:00] INFO: Processing ruby\_block[reload\_client\_config] action create (chef-client::config line 96) 172.27.28.220 [2014-09-04T00:09:02-07:00] INFO: ruby\_block[reload\_client\_config] called 172.27.28.220 [2014-09-04T00:09:02-07:00] INFO: Processing directory[C:/chef/client.d] action create (chef-client::config line 89) 172.27.28.220 [2014-09-04T00:09:02-07:00] INFO: directory[C:/chef/client.d] created directory C:/chef/client.d 172.27.28.220 [2014-09-04T00:09:02-07:00] INFO: directory[C:/chef/client.d] owner changed to S-1-5-21-1358994766-942838864-10853432-500 172.27.28.220 [2014-09-04T00:09:02-07:00] INFO: directory[C:/chef/client.d] group changed to S-1-5-32-544 172.27.28.220 [2014-09-04T00:09:02-07:00] INFO: directory[C:/chef/client.d] permissions changed to [WIN-6G50U0QH101\Administrator/flags:0/mask:e0010000, BUILTIN\Administrators/flags:0/mask:a0000000, Everyone/flags:0/mask:a0000000] 172.27.28.220 [2014-09-04T00:09:02-07:00] INFO: Processing ruby\_block[reload\_client\_config] action nothing (chef-client::config line 96) 172.27.28.220 [2014-09-04T00:09:02-07:00] INFO: Processing ohai[custom\_hints] action nothing (base-econ::configure\_ohai line 37) 172.27.28.220 [2014-09-04T00:09:02-07:00] INFO: Processing windows\_feature[IIS-WebServerRole] action install (iis::default line 22) 172.27.28.220 [2014-09-04T00:09:17-07:00] INFO: windows\_feature[IIS-WebServerRole] installed feature 172.27.28.220 [2014-09-04T00:09:17-07:00] INFO: Processing service[iis] action enable (iis::default line 27) 172.27.28.220 [2014-09-04T00:09:17-07:00] INFO: Processing service[iis] action start (iis::default line 27) 172.27.28.220 [2014-09-04T00:09:17-07:00] INFO: Processing windows\_feature[IIS-ISAPIFilter] action install (iis::mod\_isapi line 30) 172.27.28.220 [2014-09-04T00:09:20-07:00] INFO: windows\_feature[IIS-ISAPIFilter] installed feature 172.27.28.220 [2014-09-04T00:09:20-07:00] INFO: Processing windows\_feature[IIS-ISAPIExtensions] action install (iis::mod\_isapi line 30) 172.27.28.220 [2014-09-04T00:09:23-07:00] INFO: windows\_feature[IIS-ISAPIExtensions] installed feature 172.27.28.220 [2014-09-04T00:09:23-07:00] INFO: Processing windows\_feature[NetFx3] action install (iis-econ::default line 25) 172.27.28.220 [2014-09-04T00:09:42-07:00] INFO: windows\_feature[NetFx3] installed feature 172.27.28.220 [2014-09-04T00:09:42-07:00] INFO: Processing windows\_feature[IIS-ASP] action install (iis-econ::default line 25) 172.27.28.220 [2014-09-04T00:09:47-07:00] INFO: windows\_feature[IIS-ASP] installed feature 172.27.28.220 [2014-09-04T00:09:47-07:00] INFO: Processing windows\_feature[IIS-NetFxExtensibility] action install (iis::mod\_aspnet line 31) 172.27.28.220 [2014-09-04T00:10:01-07:00] INFO: windows\_feature[IIS-NetFxExtensibility] installed feature 172.27.28.220 [2014-09-04T00:10:01-07:00] INFO: Processing windows\_feature[IIS-ASPNET] action install (iis::mod\_aspnet line 31) 172.27.28.220 [2014-09-04T00:10:06-07:00] INFO: windows\_feature[IIS-ASPNET] installed feature 172.27.28.220 [2014-09-04T00:10:06-07:00] INFO: Processing iis\_site[Default Web Site] action stop (iis-econ::default line 33) 172.27.28.220 [2014-09-04T00:10:07-07:00] INFO: iis\_site[Default Web Site] stopped 172.27.28.220 [2014-09-04T00:10:07-07:00] INFO: Processing iis\_site[Default Web Site] action delete (iis-econ::default line 33) 172.27.28.220 [2014-09-04T00:10:07-07:00] INFO: iis\_site[Default Web Site] deleted 172.27.28.220 [2014-09-04T00:10:07-07:00] INFO: Processing windows\_feature[TelnetClient] action install (base-econ::base-windows line 12) 172.27.28.220 [2014-09-04T00:10:10-07:00] INFO: windows\_feature[TelnetClient] installed feature 172.27.28.220 [2014-09-04T00:10:10-07:00] INFO: Processing windows\_package[NXLOG-CE] action install (nxlog::install line 2) 172.27.28.220 [2014-09-04T00:10:10-07:00] INFO: Installing windows\_package[NXLOG-CE] version 2.7.1191 172.27.28.220 [2014-09-04T00:10:10-07:00] INFO: Processing remote\_file[D:\chef\cache/nxlog-ce-2.7.1191.msi] action create (dynamically defined) 172.27.28.220 172.27.28.220

# 172.27.28.220 Error executing action `create` on resource ’remote\_file[D:\chef\cache/nxlog-ce-2.7.1191.msi]' 172.27.28.220

172.27.28.220  
172.27.28.220 Chef::Exceptions::EnclosingDirectoryDoesNotExist  
172.27.28.220 ------------------------------------------------  
172.27.28.220 Parent directory D:\chef\cache does not exist.

---

<div class="post-metadata">

**Author:** ![Michael\_Glenney](https://avatars.discourse-cdn.com/v4/letter/m/a9adbd/32.png) [@Michael\_Glenney](https://discourse.chef.io/u/Michael_Glenney)\
**Post date:** [September 4, 2014, 9:54pm UTC](https://discourse.chef.io/t/errors-changing-file-cache-path-using-chef-client-cookbook-during-bootstrap/5763/2 "2014-09-04T21:54:15Z")

</div>

You have a forward slash in there instead of a backslash. But I doubt  
that's the issue. Looks more like it's exactly what you think the issue  
is. I don't have a fix for that but I do have a recommendation:

This type of nonsense is exactly why I stopped using the chef-client  
cookbook. For the long-run I suggest you not manage the config file with  
chef. I manage the client config with bootstrap. Managing through  
bootstrap will allow you to change settings and/or upgrade the client and  
the changes will be in affect for that run. You won't have to wait until  
the next which can be frustrating especially if you don't run chef-client  
in daemon mode. So just simply re-bootstrap the node with the proper  
settings.

I'm sure some will disagree with that approach but the whole idea of  
managing the client through a cookbook always smelled to me. Maybe it's my  
inner control freak but the fact that your client could/would have  
different settings the first time your run as opposed to subsequent runs  
and the fact that when I made changes I'd have to wait until a subsequent  
run for them to take affect made removing that from our runlist my first  
priority when started at my current company.

So says me 🙂

On Thu, Sep 4, 2014 at 1:00 AM, Jeppe Nejsum Madsen [jeppe@ingolfs.dk](mailto:jeppe@ingolfs.dk)  
wrote:

> Hi
> 
> We need to change the file\_cache\_path to point to a different location, so  
> I have this in my env
> 
> ```
> :chef_client => {
> :config => {
> :file_cache_path => "D:\\chef\\cache",
> :file_backup_path => "D:\\chef\\backup"
> }
> },
> 
> ```
> 
> I'm using the chef-client::config recipe to manage client.rb, but it seems  
> the reload of the config doesn't effect the current run, since the new  
> directories are not created so a later recipe (that tries to download to  
> the cache folder) fails. See output below.
> 
> The client.rb is updated to have the correct settings.
> 
> The rather strange thing is that the chef-stacktrace file is written to  
> the new cache dir on the D: drive, so next time I run chef-client things  
> are working....
> 
> Any hints?
> 
> /Jeppe
> 
> # 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: Processing directory[C:/chef/run] action create (chef-client::config line 77) 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: directory[C:/chef/run] created directory C:/chef/run 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: directory[C:/chef/run] owner changed to S-1-5-21-1358994766-942838864-10853432-500 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: directory[C:/chef/run] group changed to S-1-5-32-544 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: Processing directory[C:/chef/cache] action create (chef-client::config line 77) 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: directory[C:/chef/cache] owner changed to S-1-5-21-1358994766-942838864-10853432-500 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: directory[C:/chef/cache] group changed to S-1-5-32-544 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: Processing directory[C:/chef/backup] action create (chef-client::config line 77) 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: directory[C:/chef/backup] created directory C:/chef/backup 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: directory[C:/chef/backup] owner changed to S-1-5-21-1358994766-942838864-10853432-500 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: directory[C:/chef/backup] group changed to S-1-5-32-544 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: Processing directory[C:/chef/log] action create (chef-client::config line 77) 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: directory[C:/chef/log] created directory C:/chef/log 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: directory[C:/chef/log] owner changed to S-1-5-21-1358994766-942838864-10853432-500 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: directory[C:/chef/log] group changed to S-1-5-32-544 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: directory[C:/chef/log] permissions changed to [WIN-6G50U0QH101\Administrator/flags:0/mask:e0010000, BUILTIN\Administrators/flags:0/mask:a0000000] 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: Processing directory[C:/chef] action create (chef-client::config line 77) 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: directory[C:/chef] owner changed to S-1-5-21-1358994766-942838864-10853432-500 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: directory[C:/chef] group changed to S-1-5-32-544 172.27.28.220 [2014-09-04T00:09:01-07:00] INFO: Processing template[C:/chef/client.rb] action create (chef-client::config line 73) 172.27.28.220 [2014-09-04T00:09:02-07:00] INFO: template[C:/chef/client.rb] backed up to c:/chef/backup/chef/client.rb.chef-20140904000902.422562 172.27.28.220 [2014-09-04T00:09:02-07:00] INFO: template[C:/chef/client.rb] updated file contents C:/chef/client.rb 172.27.28.220 [2014-09-04T00:09:02-07:00] INFO: template[C:/chef/client.rb] owner changed to S-1-5-21-1358994766-942838864-10853432-500 172.27.28.220 [2014-09-04T00:09:02-07:00] INFO: template[C:/chef/client.rb] group changed to S-1-5-32-544 172.27.28.220 [2014-09-04T00:09:02-07:00] INFO: template[C:/chef/client.rb] permissions changed to [WIN-6G50U0QH101\Administrator/flags:0/mask:c0010000, BUILTIN\Administrators/flags:0/mask:80000000, Everyone/flags:0/mask:80000000] 172.27.28.220 [2014-09-04T00:09:02-07:00] INFO: template[C:/chef/client.rb] sending create action to ruby\_block[reload\_client\_config] (immediate) 172.27.28.220 [2014-09-04T00:09:02-07:00] INFO: Processing ruby\_block[reload\_client\_config] action create (chef-client::config line 96) 172.27.28.220 [2014-09-04T00:09:02-07:00] INFO: ruby\_block[reload\_client\_config] called 172.27.28.220 [2014-09-04T00:09:02-07:00] INFO: Processing directory[C:/chef/client.d] action create (chef-client::config line 89) 172.27.28.220 [2014-09-04T00:09:02-07:00] INFO: directory[C:/chef/client.d] created directory C:/chef/client.d 172.27.28.220 [2014-09-04T00:09:02-07:00] INFO: directory[C:/chef/client.d] owner changed to S-1-5-21-1358994766-942838864-10853432-500 172.27.28.220 [2014-09-04T00:09:02-07:00] INFO: directory[C:/chef/client.d] group changed to S-1-5-32-544 172.27.28.220 [2014-09-04T00:09:02-07:00] INFO: directory[C:/chef/client.d] permissions changed to [WIN-6G50U0QH101\Administrator/flags:0/mask:e0010000, BUILTIN\Administrators/flags:0/mask:a0000000, Everyone/flags:0/mask:a0000000] 172.27.28.220 [2014-09-04T00:09:02-07:00] INFO: Processing ruby\_block[reload\_client\_config] action nothing (chef-client::config line 96) 172.27.28.220 [2014-09-04T00:09:02-07:00] INFO: Processing ohai[custom\_hints] action nothing (base-econ::configure\_ohai line 37) 172.27.28.220 [2014-09-04T00:09:02-07:00] INFO: Processing windows\_feature[IIS-WebServerRole] action install (iis::default line 22) 172.27.28.220 [2014-09-04T00:09:17-07:00] INFO: windows\_feature[IIS-WebServerRole] installed feature 172.27.28.220 [2014-09-04T00:09:17-07:00] INFO: Processing service[iis] action enable (iis::default line 27) 172.27.28.220 [2014-09-04T00:09:17-07:00] INFO: Processing service[iis] action start (iis::default line 27) 172.27.28.220 [2014-09-04T00:09:17-07:00] INFO: Processing windows\_feature[IIS-ISAPIFilter] action install (iis::mod\_isapi line 30) 172.27.28.220 [2014-09-04T00:09:20-07:00] INFO: windows\_feature[IIS-ISAPIFilter] installed feature 172.27.28.220 [2014-09-04T00:09:20-07:00] INFO: Processing windows\_feature[IIS-ISAPIExtensions] action install (iis::mod\_isapi line 30) 172.27.28.220 [2014-09-04T00:09:23-07:00] INFO: windows\_feature[IIS-ISAPIExtensions] installed feature 172.27.28.220 [2014-09-04T00:09:23-07:00] INFO: Processing windows\_feature[NetFx3] action install (iis-econ::default line 25) 172.27.28.220 [2014-09-04T00:09:42-07:00] INFO: windows\_feature[NetFx3] installed feature 172.27.28.220 [2014-09-04T00:09:42-07:00] INFO: Processing windows\_feature[IIS-ASP] action install (iis-econ::default line 25) 172.27.28.220 [2014-09-04T00:09:47-07:00] INFO: windows\_feature[IIS-ASP] installed feature 172.27.28.220 [2014-09-04T00:09:47-07:00] INFO: Processing windows\_feature[IIS-NetFxExtensibility] action install (iis::mod\_aspnet line 31) 172.27.28.220 [2014-09-04T00:10:01-07:00] INFO: windows\_feature[IIS-NetFxExtensibility] installed feature 172.27.28.220 [2014-09-04T00:10:01-07:00] INFO: Processing windows\_feature[IIS-ASPNET] action install (iis::mod\_aspnet line 31) 172.27.28.220 [2014-09-04T00:10:06-07:00] INFO: windows\_feature[IIS-ASPNET] installed feature 172.27.28.220 [2014-09-04T00:10:06-07:00] INFO: Processing iis\_site[Default Web Site] action stop (iis-econ::default line 33) 172.27.28.220 [2014-09-04T00:10:07-07:00] INFO: iis\_site[Default Web Site] stopped 172.27.28.220 [2014-09-04T00:10:07-07:00] INFO: Processing iis\_site[Default Web Site] action delete (iis-econ::default line 33) 172.27.28.220 [2014-09-04T00:10:07-07:00] INFO: iis\_site[Default Web Site] deleted 172.27.28.220 [2014-09-04T00:10:07-07:00] INFO: Processing windows\_feature[TelnetClient] action install (base-econ::base-windows line 12) 172.27.28.220 [2014-09-04T00:10:10-07:00] INFO: windows\_feature[TelnetClient] installed feature 172.27.28.220 [2014-09-04T00:10:10-07:00] INFO: Processing windows\_package[NXLOG-CE] action install (nxlog::install line 2) 172.27.28.220 [2014-09-04T00:10:10-07:00] INFO: Installing windows\_package[NXLOG-CE] version 2.7.1191 172.27.28.220 [2014-09-04T00:10:10-07:00] INFO: Processing remote\_file[D:\chef\cache/nxlog-ce-2.7.1191.msi] action create (dynamically defined) 172.27.28.220 172.27.28.220
> 
> # 172.27.28.220 Error executing action `create` on resource 'remote\_file[D:\chef\cache/nxlog-ce-2.7.1191.msi]' 172.27.28.220
> 
> 172.27.28.220  
> 172.27.28.220 Chef::Exceptions::EnclosingDirectoryDoesNotExist  
> 172.27.28.220 ------------------------------------------------  
> 172.27.28.220 Parent directory D:\chef\cache does not exist.
