# Hi i am not able to copy folder from chefdk instances to another instances

**URL:** <https://discourse.chef.io/t/hi-i-am-not-able-to-copy-folder-from-chefdk-instances-to-another-instances/10998>\
**Category:** Chef Infra (archive)\
**Created:** [June 12, 2017, 2:08pm UTC](https://discourse.chef.io/t/hi-i-am-not-able-to-copy-folder-from-chefdk-instances-to-another-instances/10998 "2017-06-12T14:08:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sravan7](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@sravan7](https://discourse.chef.io/u/sravan7)\
**Post date:** [June 12, 2017, 2:08pm UTC](https://discourse.chef.io/t/hi-i-am-not-able-to-copy-folder-from-chefdk-instances-to-another-instances/10998/1 "2017-06-12T14:08:48Z")

</div>

i am using this recipe to move my local directory to node instances, can any one correct me where i went wrong

directory ‘/tmp/folder’ do  
owner 'root’  
group 'root’  
mode '0755’  
action :create  
end

in directory i am giving my local folder path which need to move, if i do that then where i need to assign my source path in above recipe, please help me on this issue, thank you

---

<div class="post-metadata">

**Author:** ![sunilkumar](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@sunilkumar](https://discourse.chef.io/u/sunilkumar)\
**Post date:** [June 14, 2017, 7:07am UTC](https://discourse.chef.io/t/hi-i-am-not-able-to-copy-folder-from-chefdk-instances-to-another-instances/10998/2 "2017-06-14T07:07:38Z")

</div>

Hi Sravan,

Copy your directory in files folder inside your cookbook and use cookbook\_file resource.

cookbook\_file ‘/var/lib/tomcat/webapps/litpro.war’ do  
source 'litpro.war’  
action :create  
end

In the above example my litpro.war is in files/default [directory.It](http://directory.It) will copy to webapps folder inside my server.

---

<div class="post-metadata">

**Author:** ![sravan7](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@sravan7](https://discourse.chef.io/u/sravan7)\
**Post date:** [June 27, 2017, 1:21pm UTC](https://discourse.chef.io/t/hi-i-am-not-able-to-copy-folder-from-chefdk-instances-to-another-instances/10998/3 "2017-06-27T13:21:25Z")

</div>

Thanks sunil for your support

---

<div class="post-metadata">

**Author:** ![sunilkumar](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@sunilkumar](https://discourse.chef.io/u/sunilkumar)\
**Post date:** [June 28, 2017, 7:22am UTC](https://discourse.chef.io/t/hi-i-am-not-able-to-copy-folder-from-chefdk-instances-to-another-instances/10998/4 "2017-06-28T07:22:22Z")

</div>

You are Welcome.
