# More fun with 11.6.0-hotfix.1 and Windows file access

**URL:** <https://discourse.chef.io/t/more-fun-with-11-6-0-hotfix-1-and-windows-file-access/4319>\
**Category:** Chef Infra (archive)\
**Created:** [August 15, 2013, 6:08pm UTC](https://discourse.chef.io/t/more-fun-with-11-6-0-hotfix-1-and-windows-file-access/4319 "2013-08-15T18:08:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brian\_Anderson](https://avatars.discourse-cdn.com/v4/letter/b/d6d6ee/32.png) [@Brian\_Anderson](https://discourse.chef.io/u/Brian_Anderson)\
**Post date:** [August 15, 2013, 6:08pm UTC](https://discourse.chef.io/t/more-fun-with-11-6-0-hotfix-1-and-windows-file-access/4319/1 "2013-08-15T18:08:47Z")

</div>

I’ve just installed Chef 11.6.0-hotfix.1 and while it has fixed some of my  
file problems, I’ve still got one issue. (This works fine in 11.4.4-2). I’m  
wondering if anyone else has seen this (or if I’m the only sad admin who  
has to support Linux and Windows systems in the same cookbooks)

I have the following 2 recipes (checks for internally developed services):

sensu-x1batch-checks.rb:

service “sensu-client” do  
action :nothing  
end

template “/etc/sensu/conf.d/worker-batch.json” do  
source "sensu-confd/worker-batch.json.erb"  
owner node[‘sensu’][‘user’]  
group node[‘sensu’][‘group’]  
mode "0644"  
notifies :restart, “service[sensu-client]“  
only\_if {File.exists?(”/etc/sensu/conf.d”)}  
end

sensu-x1interactive-checks.rb:

service “sensu-client” do  
action :nothing  
end

template “/etc/sensu/conf.d/worker-interactive.json” do  
source "sensu-confd/worker-interactive.json.erb"  
owner node[‘sensu’][‘user’]  
group node[‘sensu’][‘group’]  
mode "0644"  
notifies :restart, “service[sensu-client]“  
only\_if {File.exists?(”/etc/sensu/conf.d”)}  
end

Most systems in our stack run either batch or interactive. A few run both.

On the ones that run both, the first recipe called works fine, but the  
second throws an error:

[c2-54-234-216-161.compute-1.amazonaws.com](http://c2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:31:30-04:00] INFO:  
Processing service[sensu-client] action nothing  
(affect\_mon::sensu-x1interactiv  
e-checks line 10)  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:31:30-04:00]  
INFO: Processing template[/etc/sensu/conf.d/worker-interactive.json] action  
create (a  
ffect\_mon::sensu-x1interactive-checks line 14)  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:31:30-04:00]  
INFO: template[/etc/sensu/conf.d/worker-interactive.json] created file  
/etc/sensu/con  
f.d/worker-interactive.json  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:31:54-04:00]  
INFO: template[/etc/sensu/conf.d/worker-interactive.json] updated file  
contents /etc/  
sensu/conf.d/worker-interactive.json  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:31:54-04:00]  
INFO: template[/etc/sensu/conf.d/worker-interactive.json] owner changed to  
S-1-5-21-2  
359669852-410513563-3594093940-500  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:31:54-04:00]  
INFO: template[/etc/sensu/conf.d/worker-interactive.json] group changed to  
S-1-5-32-5  
44  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:31:54-04:00]  
INFO: template[/etc/sensu/conf.d/worker-interactive.json] permissions  
changed to [AFF  
ECTIVA-X1\Administrator/flags:0/mask:c0010000,  
BUILTIN\Administrators/flags:0/mask:80000000,  
Everyone/flags:0/mask:80000000]  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:31:54-04:00]  
INFO: Processing service[sensu-client] action nothing  
(affect\_mon::sensu-x1batch-chec  
ks line 10)  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:31:54-04:00]  
INFO: Processing template[/etc/sensu/conf.d/worker-batch.json] action  
create (affect\_  
mon::sensu-x1batch-checks line 14)  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:31:55-04:00]  
INFO: template[/etc/sensu/conf.d/worker-batch.json] created file  
/etc/sensu/conf.d/wo  
rker-batch.json  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)  
ec2-54-234-216-161.compute-1.amazonaws.com================================================================================  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) Error executing action `create`  
on resource 'template[/etc/sensu/conf.d/worker-batch.json]'  
ec2-54-234-216-161.compute-1.amazonaws.com================================================================================  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) Errno::EACCES  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) -------------  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) Permission denied -  
/etc/sensu/conf.d/worker-batch.json  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) Resource Declaration:  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) ---------------------  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) # In  
c:/chef/cache/cookbooks/affect\_mon/recipes/sensu-x1batch-checks.rb  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) 14: template  
"/etc/sensu/conf.d/worker-batch.json" do  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) 15: source  
"sensu-confd/worker-batch.json.erb"  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) 16: owner  
node[‘sensu’][‘user’]  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) 17: group  
node[‘sensu’][‘group’]  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) 18: mode “0644"  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) 19: notifies :restart,  
“service[sensu-client]“  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) 20: only\_if  
{File.exists?(”/etc/sensu/conf.d”)}  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) 21: end  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) 22:  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) Compiled Resource:  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) ------------------  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) # Declared in  
c:/chef/cache/cookbooks/affect\_mon/recipes/sensu-x1batch-checks.rb:14:in  
`from\_file’  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)  
ec2-54-234-216-161.compute-1.amazonaws.comtemplate(”/etc/sensu/conf.d/worker-batch.json")  
do  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) provider  
Chef::Provider::Template  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) action “create"  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) retries 0  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) retry\_delay 2  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) path  
”/etc/sensu/conf.d/worker-batch.json"  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) backup 5  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) atomic\_update true  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) source  
"sensu-confd/worker-batch.json.erb"  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) cookbook\_name "affect\_mon"  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) recipe\_name  
"sensu-x1batch-checks"  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) owner "Administrator"  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) group "Administrators"  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) mode "0644"  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) only\_if { #code block }  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) end  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:32:19-04:00]  
INFO: Running queued delayed notifications before re-raising exception  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:32:19-04:00]  
INFO: template[C:/chef/client.rb] sending create action to  
ruby\_block[reload\_client\_config] (delayed)  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:32:19-04:00]  
INFO: Processing ruby\_block[reload\_client\_config] action create  
(chef-client::config line 86)  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:32:19-04:00]  
INFO: ruby\_block[reload\_client\_config] called  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:32:19-04:00]  
INFO: template[/etc/sensu/conf.d/worker-interactive.json] sending restart  
action to service[sensu-client] (delayed)  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:32:19-04:00]  
INFO: Processing service[sensu-client] action restart  
(affect\_mon::sensu-x1batch-checks line 10)  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:32:21-04:00]  
INFO: service[sensu-client] restarted  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:32:21-04:00]  
ERROR: Running exception handlers  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:32:21-04:00]  
ERROR: Exception handlers complete  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:32:21-04:00]  
FATAL: Stacktrace dumped to C:/chef/cache/chef-stacktrace.out  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:32:21-04:00]  
FATAL: Errno::EACCES: template[/etc/sensu/conf.d/worker-batch.json]  
(affect\_mon::sensu-x1batch-checks line 14) had an error: Errno::EACCES:  
Permission denied - /etc/sensu/conf.d/worker-batch.json

A file is written to the filesystem, but the file has no contents.

If I re-run chef-client it will correct the problems:

[2013-08-15T14:06:35-04:00] INFO:  
template[/etc/sensu/conf.d/worker-batch.json]  
backed up to  
C:/chef/backup/etc/sensu/conf.d/worker-batch.json.chef-20130815140  
35  
[2013-08-15T14:06:35-04:00] INFO:  
template[/etc/sensu/conf.d/worker-batch.json]  
updated file contents /etc/sensu/conf.d/worker-batch.json

```
- update content in file /etc/sensu/conf.d/worker-batch.json from

```

e3b0c4 to  
0366cc  
\* Could not determine diff. Error: diff:  
/etc/sensu/conf.d/worker-batch.j\*  
_on: No such file or directory_  
[2013-08-15T14:06:35-04:00] INFO:  
template[/etc/sensu/conf.d/worker-batch.json]  
owner changed to S-1-5-21-2359669852-410513563-3594093940-500  
[2013-08-15T14:06:35-04:00] INFO:  
template[/etc/sensu/conf.d/worker-batch.json]  
group changed to S-1-5-32-544  
[2013-08-15T14:06:35-04:00] INFO:  
template[/etc/sensu/conf.d/worker-batch.json]  
permissions changed to [AFFECTIVA-X1\Administrator/flags:0/mask:c0010000,  
BUILT  
N\Administrators/flags:0/mask:80000000, Everyone/flags:0/mask:80000000]

And the stack trace from the failed run:

Generated at 2013-08-15 12:32:21 -0400  
Errno::EACCES: template[/etc/sensu/conf.d/worker-batch.json]  
(affect\_mon::sensu-x1batch-checks line 14) had an error: Errno::EACCES:  
Permission denied - /etc/sensu/conf.d/worker-batch.json  
C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:1406:in `unlink' C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:1406:in`block in  
remove\_file’  
C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:1414:in  
`platform_support' C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:1405:in`remove\_file’  
C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:515:in `block in mv' C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:1515:in`block in  
fu\_each\_src\_dest’  
C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:1531:in  
`fu_each_src_dest0' C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:1513:in`fu\_each\_src\_dest’  
C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:508:in `mv' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/file_content_management/deploy/mv_windows.rb:78:in`deploy’  
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/provider/file.rb:331:in  
`update_file_contents' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/provider/file.rb:350:in`block in do\_contents\_changes’  
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/mixin/why\_run.rb:52:in  
`call' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/mixin/why_run.rb:52:in`add\_action’  
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/provider.rb:149:in  
`converge_by' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/provider/file.rb:349:in`do\_contents\_changes’  
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/provider/file.rb:120:in  
`action_create' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/provider.rb:114:in`run\_action’  
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/resource.rb:625:in  
`run_action' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/runner.rb:49:in`run\_action’  
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/runner.rb:81:in  
`block (2 levels) in converge' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/runner.rb:81:in`each’  
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/runner.rb:81:in  
`block in converge' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/resource_collection.rb:98:in`block in execute\_each\_resource’  
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/resource\_collection/stepable\_iterator.rb:116:in  
`call' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/resource_collection/stepable_iterator.rb:116:in`call\_iterator\_block’  
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/resource\_collection/stepable\_iterator.rb:85:in  
`step' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/resource_collection/stepable_iterator.rb:104:in`iterate’  
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/resource\_collection/stepable\_iterator.rb:55:in  
`each_with_index' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/resource_collection.rb:96:in`execute\_each\_resource’  
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/runner.rb:80:in  
`converge' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/client.rb:429:in`converge’  
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/client.rb:494:in  
`do_run' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/client.rb:212:in`run’  
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/application.rb:183:in  
`run_chef_client' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/application/client.rb:302:in`block in run\_application’  
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/application/client.rb:294:in  
`loop' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/application/client.rb:294:in`run\_application’  
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/application.rb:66:in  
`run' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/bin/chef-client:26:in`\<top (required)\>'  
C:/opscode/chef/bin/chef-client:23:in `load' C:/opscode/chef/bin/chef-client:23:in`’

–  
_Brian Anderson_ | Operations Engineer  
Phone 781.696.1304

[www.affectiva.com](http://www.affectiva.com)  
[http://www.facebook.com/affectiva](http://www.facebook.com/affectiva)[https://twitter.com/Affectiva](https://twitter.com/Affectiva)  
[http://www.youtube.com/user/affectiva](http://www.youtube.com/user/affectiva)  
[http://www.affectiva.com/blog/](http://www.affectiva.com/blog/) [http://www.linkedin.com/company/affectiva\_2](http://www.linkedin.com/company/affectiva_2)  
[https://plus.google.com/b/115885368219797754125/115885368219797754125/posts](https://plus.google.com/b/115885368219797754125/115885368219797754125/posts)  
w

---

<div class="post-metadata">

**Author:** ![Serdar\_Sutay](https://avatars.discourse-cdn.com/v4/letter/s/c68b51/32.png) [@Serdar\_Sutay](https://discourse.chef.io/u/Serdar_Sutay)\
**Post date:** [August 15, 2013, 6:41pm UTC](https://discourse.chef.io/t/more-fun-with-11-6-0-hotfix-1-and-windows-file-access/4319/2 "2013-08-15T18:41:35Z")

</div>

Interesting issue… Thanks for sharing… Looks like one of the template is failing while trying to “move” the file (atomic update - a new feature of 11.6).

A few questions & ideas Brian:

- What is the windows flavor you are working on?
- Looks like the files are going to “C:”. Is the source of the template also on the same drive?
- How is the “/etc/sensu/conf.d/” directory is created?
- Can you check the ACLs (permissions) on that directory before the run and after a chef-client run?
- Can you try setting atomic\_update = false in these resources and see if that works for you?

Thanks,  
Serdar

* * *

From: Brian Anderson [brian.anderson@affectiva.com](mailto:brian.anderson@affectiva.com)  
Sent: Thursday, August 15, 2013 9:08 PM  
To: [chef@lists.opscode.com](mailto:chef@lists.opscode.com)  
Subject: [chef] More fun with 11.6.0-hotfix.1 and Windows file access

I’ve just installed Chef 11.6.0-hotfix.1 and while it has fixed some of my file problems, I’ve still got one issue. (This works fine in 11.4.4-2). I’m wondering if anyone else has seen this (or if I’m the only sad admin who has to support Linux and Windows systems in the same cookbooks)

I have the following 2 recipes (checks for internally developed services):

sensu-x1batch-checks.rb:

service “sensu-client” do  
action :nothing  
end

template “/etc/sensu/conf.d/worker-batch.json” do  
source "sensu-confd/worker-batch.json.erb"  
owner node[‘sensu’][‘user’]  
group node[‘sensu’][‘group’]  
mode "0644"  
notifies :restart, “service[sensu-client]“  
only\_if {File.exists?(”/etc/sensu/conf.d”)}  
end

sensu-x1interactive-checks.rb:

service “sensu-client” do  
action :nothing  
end

template “/etc/sensu/conf.d/worker-interactive.json” do  
source "sensu-confd/worker-interactive.json.erb"  
owner node[‘sensu’][‘user’]  
group node[‘sensu’][‘group’]  
mode "0644"  
notifies :restart, “service[sensu-client]“  
only\_if {File.exists?(”/etc/sensu/conf.d”)}  
end

Most systems in our stack run either batch or interactive. A few run both.

On the ones that run both, the first recipe called works fine, but the second throws an error:

[c2-54-234-216-161.compute-1.amazonaws.com](http://c2-54-234-216-161.compute-1.amazonaws.com)[http://c2-54-234-216-161.compute-1.amazonaws.com](http://c2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:31:30-04:00] INFO: Processing service[sensu-client] action nothing (affect\_mon::sensu-x1interactiv  
e-checks line 10)  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:31:30-04:00] INFO: Processing template[/etc/sensu/conf.d/worker-interactive.json] action create (a  
ffect\_mon::sensu-x1interactive-checks line 14)  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:31:30-04:00] INFO: template[/etc/sensu/conf.d/worker-interactive.json] created file /etc/sensu/con  
f.d/worker-interactive.json  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:31:54-04:00] INFO: template[/etc/sensu/conf.d/worker-interactive.json] updated file contents /etc/  
sensu/conf.d/worker-interactive.json  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:31:54-04:00] INFO: template[/etc/sensu/conf.d/worker-interactive.json] owner changed to S-1-5-21-2  
359669852-410513563-3594093940-500  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:31:54-04:00] INFO: template[/etc/sensu/conf.d/worker-interactive.json] group changed to S-1-5-32-5  
44  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:31:54-04:00] INFO: template[/etc/sensu/conf.d/worker-interactive.json] permissions changed to [AFF  
ECTIVA-X1\Administrator/flags:0/mask:c0010000, BUILTIN\Administrators/flags:0/mask:80000000, Everyone/flags:0/mask:80000000]  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:31:54-04:00] INFO: Processing service[sensu-client] action nothing (affect\_mon::sensu-x1batch-chec  
ks line 10)  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:31:54-04:00] INFO: Processing template[/etc/sensu/conf.d/worker-batch.json] action create (affect\_  
mon::sensu-x1batch-checks line 14)  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:31:55-04:00] INFO: template[/etc/sensu/conf.d/worker-batch.json] created file /etc/sensu/conf.d/wo  
rker-batch.json  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) ================================================================================  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) Error executing action `create` on resource 'template[/etc/sensu/conf.d/worker-batch.json]'  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) ================================================================================  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) Errno::EACCES  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) -------------  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) Permission denied - /etc/sensu/conf.d/worker-batch.json  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) Resource Declaration:  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) ---------------------  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) # In c:/chef/cache/cookbooks/affect\_mon/recipes/sensu-x1batch-checks.rb  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) 14: template “/etc/sensu/conf.d/worker-batch.json” do  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) 15: source “sensu-confd/worker-batch.json.erb"  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) 16: owner node[‘sensu’][‘user’]  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) 17: group node[‘sensu’][‘group’]  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) 18: mode “0644"  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) 19: notifies :restart, “service[sensu-client]“  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) 20: only\_if {File.exists?(”/etc/sensu/conf.d”)}  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) 21: end  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) 22:  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) Compiled Resource:  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) ------------------  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) # Declared in c:/chef/cache/cookbooks/affect\_mon/recipes/sensu-x1batch-checks.rb:14:in `from\_file’  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) template(”/etc/sensu/conf.d/worker-batch.json”) do  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) provider Chef::Provider::Template  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) action "create"  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) retries 0  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) retry\_delay 2  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) path "/etc/sensu/conf.d/worker-batch.json"  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) backup 5  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) atomic\_update true  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) source "sensu-confd/worker-batch.json.erb"  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) cookbook\_name "affect\_mon"  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) recipe\_name "sensu-x1batch-checks"  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) owner "Administrator"  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) group "Administrators"  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) mode "0644"  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) only\_if { #code block }  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) end  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:32:19-04:00] INFO: Running queued delayed notifications before re-raising exception  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:32:19-04:00] INFO: template[C:/chef/client.rb] sending create action to ruby\_block[reload\_client\_config] (delayed)  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:32:19-04:00] INFO: Processing ruby\_block[reload\_client\_config] action create (chef-client::config line 86)  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:32:19-04:00] INFO: ruby\_block[reload\_client\_config] called  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:32:19-04:00] INFO: template[/etc/sensu/conf.d/worker-interactive.json] sending restart action to service[sensu-client] (delayed)  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:32:19-04:00] INFO: Processing service[sensu-client] action restart (affect\_mon::sensu-x1batch-checks line 10)  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:32:21-04:00] INFO: service[sensu-client] restarted  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:32:21-04:00] ERROR: Running exception handlers  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:32:21-04:00] ERROR: Exception handlers complete  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:32:21-04:00] FATAL: Stacktrace dumped to C:/chef/cache/chef-stacktrace.out  
[ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)[http://ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:32:21-04:00] FATAL: Errno::EACCES: template[/etc/sensu/conf.d/worker-batch.json] (affect\_mon::sensu-x1batch-checks line 14) had an error: Errno::EACCES: Permission denied - /etc/sensu/conf.d/worker-batch.json

A file is written to the filesystem, but the file has no contents.

If I re-run chef-client it will correct the problems:

[2013-08-15T14:06:35-04:00] INFO: template[/etc/sensu/conf.d/worker-batch.json]  
backed up to C:/chef/backup/etc/sensu/conf.d/worker-batch.json.chef-20130815140  
35  
[2013-08-15T14:06:35-04:00] INFO: template[/etc/sensu/conf.d/worker-batch.json]  
updated file contents /etc/sensu/conf.d/worker-batch.json

```
- update content in file /etc/sensu/conf.d/worker-batch.json from e3b0c4 to

```

0366cc  
Could not determine diff. Error: diff: /etc/sensu/conf.d/worker-batch.j  
on: No such file or directory  
[2013-08-15T14:06:35-04:00] INFO: template[/etc/sensu/conf.d/worker-batch.json]  
owner changed to S-1-5-21-2359669852-410513563-3594093940-500  
[2013-08-15T14:06:35-04:00] INFO: template[/etc/sensu/conf.d/worker-batch.json]  
group changed to S-1-5-32-544  
[2013-08-15T14:06:35-04:00] INFO: template[/etc/sensu/conf.d/worker-batch.json]  
permissions changed to [AFFECTIVA-X1\Administrator/flags:0/mask:c0010000, BUILT  
N\Administrators/flags:0/mask:80000000, Everyone/flags:0/mask:80000000]

And the stack trace from the failed run:

Generated at 2013-08-15 12:32:21 -0400  
Errno::EACCES: template[/etc/sensu/conf.d/worker-batch.json] (affect\_mon::sensu-x1batch-checks line 14) had an error: Errno::EACCES: Permission denied - /etc/sensu/conf.d/worker-batch.json  
C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:1406:in `unlink' C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:1406:in`block in remove\_file’  
C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:1414:in `platform_support' C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:1405:in`remove\_file’  
C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:515:in `block in mv' C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:1515:in`block in fu\_each\_src\_dest’  
C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:1531:in `fu_each_src_dest0' C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:1513:in`fu\_each\_src\_dest’  
C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:508:in `mv' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/file_content_management/deploy/mv_windows.rb:78:in`deploy’  
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/provider/file.rb:331:in `update_file_contents' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/provider/file.rb:350:in`block in do\_contents\_changes’  
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/mixin/why\_run.rb:52:in `call' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/mixin/why_run.rb:52:in`add\_action’  
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/provider.rb:149:in `converge_by' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/provider/file.rb:349:in`do\_contents\_changes’  
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/provider/file.rb:120:in `action_create' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/provider.rb:114:in`run\_action’  
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/resource.rb:625:in `run_action' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/runner.rb:49:in`run\_action’  
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/runner.rb:81:in `block (2 levels) in converge' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/runner.rb:81:in`each’  
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/runner.rb:81:in `block in converge' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/resource_collection.rb:98:in`block in execute\_each\_resource’  
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/resource\_collection/stepable\_iterator.rb:116:in `call' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/resource_collection/stepable_iterator.rb:116:in`call\_iterator\_block’  
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/resource\_collection/stepable\_iterator.rb:85:in `step' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/resource_collection/stepable_iterator.rb:104:in`iterate’  
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/resource\_collection/stepable\_iterator.rb:55:in `each_with_index' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/resource_collection.rb:96:in`execute\_each\_resource’  
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/runner.rb:80:in `converge' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/client.rb:429:in`converge’  
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/client.rb:494:in `do_run' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/client.rb:212:in`run’  
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/application.rb:183:in `run_chef_client' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/application/client.rb:302:in`block in run\_application’  
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/application/client.rb:294:in `loop' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/application/client.rb:294:in`run\_application’  
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/application.rb:66:in `run' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/bin/chef-client:26:in`\<top (required)\>'  
C:/opscode/chef/bin/chef-client:23:in `load' C:/opscode/chef/bin/chef-client:23:in`’

–  
Brian Anderson | Operations Engineer  
Phone 781.696.1304  
[[http://www.finsmes.com/wp-content/uploads/2011/07/Affectiva\_logo\_JPG.jpg](http://www.finsmes.com/wp-content/uploads/2011/07/Affectiva_logo_JPG.jpg)]  
[www.affectiva.com](http://www.affectiva.com)[http://www.affectiva.com/](http://www.affectiva.com/)  
[[http://www.snoitulosten.com/wp-content/uploads/2010/01/facebook-small.jpg](http://www.snoitulosten.com/wp-content/uploads/2010/01/facebook-small.jpg)][http://www.facebook.com/affectiva](http://www.facebook.com/affectiva) [[http://www.snoitulosten.com/wp-content/uploads/2010/01/twitter-small.jpg](http://www.snoitulosten.com/wp-content/uploads/2010/01/twitter-small.jpg)] [https://twitter.com/Affectiva](https://twitter.com/Affectiva) [[http://images4.wikia.nocookie.net/\_\_cb20101115140837/finalfantasy/images/9/93/Youtube\_icon\_logo.gif](http://images4.wikia.nocookie.net/__cb20101115140837/finalfantasy/images/9/93/Youtube_icon_logo.gif)] [http://www.youtube.com/user/affectiva](http://www.youtube.com/user/affectiva) [[http://brendanmitchell.files.wordpress.com/2009/03/blog-icon-200.png](http://brendanmitchell.files.wordpress.com/2009/03/blog-icon-200.png)] [http://www.affectiva.com/blog/](http://www.affectiva.com/blog/) [[http://www.itprosphilly.com/wp-content/uploads/2011/08/linkedin-icon-small.png](http://www.itprosphilly.com/wp-content/uploads/2011/08/linkedin-icon-small.png)] [http://www.linkedin.com/company/affectiva\_2](http://www.linkedin.com/company/affectiva_2) [[http://www.thesimplerweb.com/wp-content/uploads/2012/08/google-plus-icon.jpg?cda6c1](http://www.thesimplerweb.com/wp-content/uploads/2012/08/google-plus-icon.jpg?cda6c1)] [https://plus.google.com/b/115885368219797754125/115885368219797754125/posts](https://plus.google.com/b/115885368219797754125/115885368219797754125/posts) w

---

<div class="post-metadata">

**Author:** ![Brian\_Anderson](https://avatars.discourse-cdn.com/v4/letter/b/d6d6ee/32.png) [@Brian\_Anderson](https://discourse.chef.io/u/Brian_Anderson)\
**Post date:** [August 15, 2013, 8:13pm UTC](https://discourse.chef.io/t/more-fun-with-11-6-0-hotfix-1-and-windows-file-access/4319/3 "2013-08-15T20:13:22Z")

</div>

Perhaps helpful for diagnosing it:

If I delete worker-batch.json and worker-interactive.json then run  
chef-client it runs cleanly. If I re-run the client it errors out with  
access denied / same stack trace.

I am using c:/etc/sensu/conf.d/ as the base directory, so chef shouldn't  
have to guess what volume I'm referring to.

Brian

On Thu, Aug 15, 2013 at 2:08 PM, Brian Anderson \<  
[brian.anderson@affectiva.com](mailto:brian.anderson@affectiva.com)\> wrote:

> I've just installed Chef 11.6.0-hotfix.1 and while it has fixed some of my  
> file problems, I've still got one issue. (This works fine in 11.4.4-2). I'm  
> wondering if anyone else has seen this (or if I'm the only sad admin who  
> has to support Linux and Windows systems in the same cookbooks)
> 
> I have the following 2 recipes (checks for internally developed services):
> 
> sensu-x1batch-checks.rb:
> 
> service "sensu-client" do  
> action :nothing  
> end
> 
> template "/etc/sensu/conf.d/worker-batch.json" do  
> source "sensu-confd/worker-batch.json.erb"  
> owner node['sensu']['user']  
> group node['sensu']['group']  
> mode "0644"  
> notifies :restart, "service[sensu-client]"  
> only\_if {File.exists?("/etc/sensu/conf.d")}  
> end
> 
> sensu-x1interactive-checks.rb:
> 
> service "sensu-client" do  
> action :nothing  
> end
> 
> template "/etc/sensu/conf.d/worker-interactive.json" do  
> source "sensu-confd/worker-interactive.json.erb"  
> owner node['sensu']['user']  
> group node['sensu']['group']  
> mode "0644"  
> notifies :restart, "service[sensu-client]"  
> only\_if {File.exists?("/etc/sensu/conf.d")}  
> end
> 
> Most systems in our stack run either batch or interactive. A few run both.
> 
> On the ones that run both, the first recipe called works fine, but the  
> second throws an error:
> 
> [c2-54-234-216-161.compute-1.amazonaws.com](http://c2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:31:30-04:00]  
> INFO: Processing service[sensu-client] action nothing  
> (affect\_mon::sensu-x1interactiv  
> e-checks line 10)  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:31:30-04:00]  
> INFO: Processing template[/etc/sensu/conf.d/worker-interactive.json] action  
> create (a  
> ffect\_mon::sensu-x1interactive-checks line 14)  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:31:30-04:00]  
> INFO: template[/etc/sensu/conf.d/worker-interactive.json] created file  
> /etc/sensu/con  
> f.d/worker-interactive.json  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:31:54-04:00]  
> INFO: template[/etc/sensu/conf.d/worker-interactive.json] updated file  
> contents /etc/  
> sensu/conf.d/worker-interactive.json  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:31:54-04:00]  
> INFO: template[/etc/sensu/conf.d/worker-interactive.json] owner changed to  
> S-1-5-21-2  
> 359669852-410513563-3594093940-500  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:31:54-04:00]  
> INFO: template[/etc/sensu/conf.d/worker-interactive.json] group changed to  
> S-1-5-32-5  
> 44  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:31:54-04:00]  
> INFO: template[/etc/sensu/conf.d/worker-interactive.json] permissions  
> changed to [AFF  
> ECTIVA-X1\Administrator/flags:0/mask:c0010000,  
> BUILTIN\Administrators/flags:0/mask:80000000,  
> Everyone/flags:0/mask:80000000]  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:31:54-04:00]  
> INFO: Processing service[sensu-client] action nothing  
> (affect\_mon::sensu-x1batch-chec  
> ks line 10)  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:31:54-04:00]  
> INFO: Processing template[/etc/sensu/conf.d/worker-batch.json] action  
> create (affect\_  
> mon::sensu-x1batch-checks line 14)  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:31:55-04:00]  
> INFO: template[/etc/sensu/conf.d/worker-batch.json] created file  
> /etc/sensu/conf.d/wo  
> rker-batch.json  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)  
> ec2-54-234-216-161.compute-1.amazonaws.com================================================================================  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) Error executing action  
> `create` on resource 'template[/etc/sensu/conf.d/worker-batch.json]'  
> ec2-54-234-216-161.compute-1.amazonaws.com================================================================================  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) Errno::EACCES  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) -------------  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) Permission denied -  
> /etc/sensu/conf.d/worker-batch.json  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) Resource Declaration:  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) ---------------------  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) # In  
> c:/chef/cache/cookbooks/affect\_mon/recipes/sensu-x1batch-checks.rb  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) 14: template  
> "/etc/sensu/conf.d/worker-batch.json" do  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) 15: source  
> "sensu-confd/worker-batch.json.erb"  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) 16: owner  
> node['sensu']['user']  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) 17: group  
> node['sensu']['group']  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) 18: mode "0644"  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) 19: notifies :restart,  
> "service[sensu-client]"  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) 20: only\_if  
> {File.exists?("/etc/sensu/conf.d")}  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) 21: end  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) 22:  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) Compiled Resource:  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) ------------------  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) # Declared in  
> c:/chef/cache/cookbooks/affect\_mon/recipes/sensu-x1batch-checks.rb:14:in  
> `from\_file'  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)  
> ec2-54-234-216-161.compute-1.amazonaws.comtemplate("/etc/sensu/conf.d/worker-batch.json") do  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) provider  
> Chef::Provider::Template  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) action "create"  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) retries 0  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) retry\_delay 2  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) path  
> "/etc/sensu/conf.d/worker-batch.json"  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) backup 5  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) atomic\_update true  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) source  
> "sensu-confd/worker-batch.json.erb"  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) cookbook\_name "affect\_mon"  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) recipe\_name  
> "sensu-x1batch-checks"  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) owner "Administrator"  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) group "Administrators"  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) mode "0644"  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) only\_if { #code block }  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) end  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com)  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:32:19-04:00]  
> INFO: Running queued delayed notifications before re-raising exception  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:32:19-04:00]  
> INFO: template[C:/chef/client.rb] sending create action to  
> ruby\_block[reload\_client\_config] (delayed)  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:32:19-04:00]  
> INFO: Processing ruby\_block[reload\_client\_config] action create  
> (chef-client::config line 86)  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:32:19-04:00]  
> INFO: ruby\_block[reload\_client\_config] called  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:32:19-04:00]  
> INFO: template[/etc/sensu/conf.d/worker-interactive.json] sending restart  
> action to service[sensu-client] (delayed)  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:32:19-04:00]  
> INFO: Processing service[sensu-client] action restart  
> (affect\_mon::sensu-x1batch-checks line 10)  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:32:21-04:00]  
> INFO: service[sensu-client] restarted  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:32:21-04:00]  
> ERROR: Running exception handlers  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:32:21-04:00]  
> ERROR: Exception handlers complete  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:32:21-04:00]  
> FATAL: Stacktrace dumped to C:/chef/cache/chef-stacktrace.out  
> [ec2-54-234-216-161.compute-1.amazonaws.com](http://ec2-54-234-216-161.compute-1.amazonaws.com) [2013-08-15T12:32:21-04:00]  
> FATAL: Errno::EACCES: template[/etc/sensu/conf.d/worker-batch.json]  
> (affect\_mon::sensu-x1batch-checks line 14) had an error: Errno::EACCES:  
> Permission denied - /etc/sensu/conf.d/worker-batch.json
> 
> A file is written to the filesystem, but the file has no contents.
> 
> If I re-run chef-client it will correct the problems:
> 
> [2013-08-15T14:06:35-04:00] INFO:  
> template[/etc/sensu/conf.d/worker-batch.json]  
> backed up to  
> C:/chef/backup/etc/sensu/conf.d/worker-batch.json.chef-20130815140  
> 35  
> [2013-08-15T14:06:35-04:00] INFO:  
> template[/etc/sensu/conf.d/worker-batch.json]  
> updated file contents /etc/sensu/conf.d/worker-batch.json
> 
> ```
> - update content in file /etc/sensu/conf.d/worker-batch.json from
> 
> ```
> 
> e3b0c4 to  
> 0366cc  
> \* Could not determine diff. Error: diff:  
> /etc/sensu/conf.d/worker-batch.j\*  
> _on: No such file or directory_  
> [2013-08-15T14:06:35-04:00] INFO:  
> template[/etc/sensu/conf.d/worker-batch.json]  
> owner changed to S-1-5-21-2359669852-410513563-3594093940-500  
> [2013-08-15T14:06:35-04:00] INFO:  
> template[/etc/sensu/conf.d/worker-batch.json]  
> group changed to S-1-5-32-544  
> [2013-08-15T14:06:35-04:00] INFO:  
> template[/etc/sensu/conf.d/worker-batch.json]  
> permissions changed to [AFFECTIVA-X1\Administrator/flags:0/mask:c0010000,  
> BUILT  
> N\Administrators/flags:0/mask:80000000, Everyone/flags:0/mask:80000000]
> 
> And the stack trace from the failed run:
> 
> Generated at 2013-08-15 12:32:21 -0400  
> Errno::EACCES: template[/etc/sensu/conf.d/worker-batch.json]  
> (affect\_mon::sensu-x1batch-checks line 14) had an error: Errno::EACCES:  
> Permission denied - /etc/sensu/conf.d/worker-batch.json  
> C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:1406:in `unlink' C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:1406:in `block in  
> remove\_file'  
> C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:1414:in  
> `platform_support' C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:1405:in `remove\_file'  
> C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:515:in `block in mv' C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:1515:in `block in  
> fu\_each\_src\_dest'  
> C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:1531:in  
> `fu_each_src_dest0' C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:1513:in `fu\_each\_src\_dest'  
> C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:508:in `mv' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/file_content_management/deploy/mv_windows.rb:78:in `deploy'  
> C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/provider/file.rb:331:in  
> `update_file_contents' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/provider/file.rb:350:in `block in do\_contents\_changes'  
> C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/mixin/why\_run.rb:52:in  
> `call' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/mixin/why_run.rb:52:in `add\_action'  
> C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/provider.rb:149:in  
> `converge_by' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/provider/file.rb:349:in `do\_contents\_changes'  
> C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/provider/file.rb:120:in  
> `action_create' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/provider.rb:114:in `run\_action'  
> C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/resource.rb:625:in  
> `run_action' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/runner.rb:49:in `run\_action'  
> C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/runner.rb:81:in  
> `block (2 levels) in converge' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/runner.rb:81:in `each'  
> C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/runner.rb:81:in  
> `block in converge' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/resource_collection.rb:98:in `block in execute\_each\_resource'  
> C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/resource\_collection/stepable\_iterator.rb:116:in  
> `call' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/resource_collection/stepable_iterator.rb:116:in `call\_iterator\_block'  
> C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/resource\_collection/stepable\_iterator.rb:85:in  
> `step' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/resource_collection/stepable_iterator.rb:104:in `iterate'  
> C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/resource\_collection/stepable\_iterator.rb:55:in  
> `each_with_index' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/resource_collection.rb:96:in `execute\_each\_resource'  
> C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/runner.rb:80:in  
> `converge' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/client.rb:429:in `converge'  
> C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/client.rb:494:in  
> `do_run' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/client.rb:212:in `run'  
> C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/application.rb:183:in  
> `run_chef_client' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/application/client.rb:302:in `block in run\_application'  
> C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/application/client.rb:294:in  
> `loop' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/application/client.rb:294:in `run\_application'  
> C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/lib/chef/application.rb:66:in  
> `run' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0.hotfix.1/bin/chef-client:26:in `\<top (required)\>'  
> C:/opscode/chef/bin/chef-client:23:in `load' C:/opscode/chef/bin/chef-client:23:in `'
> 
> --  
> _Brian Anderson_ | Operations Engineer  
> Phone 781.696.1304
> 
> [www.affectiva.com](http://www.affectiva.com)  
> [http://www.facebook.com/affectiva](http://www.facebook.com/affectiva)[https://twitter.com/Affectiva](https://twitter.com/Affectiva) [http://www.youtube.com/user/affectiva](http://www.youtube.com/user/affectiva)  
> [http://www.affectiva.com/blog/](http://www.affectiva.com/blog/) [http://www.linkedin.com/company/affectiva\_2](http://www.linkedin.com/company/affectiva_2)  
> [https://plus.google.com/b/115885368219797754125/115885368219797754125/posts](https://plus.google.com/b/115885368219797754125/115885368219797754125/posts)  
> w

--  
_Brian Anderson_ | Operations Engineer  
Phone 781.696.1304

> **[Affectiva - Humanizing Technology](https://www.affectiva.com/)**
>
> Affectiva's AI analyzes complex human states in context — emotions, cognitive states, activities and objects people use.

[http://www.facebook.com/affectiva](http://www.facebook.com/affectiva)[https://twitter.com/Affectiva](https://twitter.com/Affectiva)  
[http://www.youtube.com/user/affectiva](http://www.youtube.com/user/affectiva)  
[http://www.affectiva.com/blog/](http://www.affectiva.com/blog/) [http://www.linkedin.com/company/affectiva\_2](http://www.linkedin.com/company/affectiva_2)  
[https://plus.google.com/b/115885368219797754125/115885368219797754125/posts](https://plus.google.com/b/115885368219797754125/115885368219797754125/posts)
