Error when deploying ZIP archive with Chef artifact cookbook

If you receive the following error when trying to deploy a ZIP archive with artifact_deploy resource:

=====================================================================
Error executing action `deploy` on resource ‘artifact_deploy[sampleArchive]’
=====================================================================
Chef::Exceptions::WindowsNotAdmin
———————————
[…]
Chef::Exceptions::WindowsNotAdmin: can not get the security information for ‘C:/Users/ADMINI~1/AppData/Local/Temp/kitchen/cache/artifact_deploys/sampleArchive/0.0.1/YourArchiveHere.zip’ due to missing Administrator privileges.

you might want to try to add the following configuration to your kitchen.yml file:

  client_rb:
    file_atomic_update: false

just under

provisioner:
  name: chef_zero

The reason that I’ve used it globally in the client.rb file and not in the resource is because so far artifact_deploy doesn’t support this feature.

If you’d like that feature, modify yourself the cookbook, or contact the Riot Games team

More about atomic update under Chef: Atomic File Updates
Chef version: 12.4.0
Operating system: Windows 7 Professional

Note 1: Credits go to StackOverflow, IT blogs and alike, sites that helped me with the code when searching for solutions.
Note 2: Be aware that when copy-pasting, the quotes and possibly other characters get messed up by WordPress, you’ll have to replace them.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: