# \[WARNING\]: Module remote\_tmp /root/.ansible/tmp did not exist and was created with a mode of 0700

**URL:** <https://forum.ansible.com/t/warning-module-remote-tmp-root-ansible-tmp-did-not-exist-and-was-created-with-a-mode-of-0700/28646>\
**Category:** Ansible Project\
**Created:** [September 25, 2018, 4:25pm UTC](https://forum.ansible.com/t/warning-module-remote-tmp-root-ansible-tmp-did-not-exist-and-was-created-with-a-mode-of-0700/28646 "2018-09-25T16:25:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arbab\_Nazar1](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@Arbab\_Nazar1](https://forum.ansible.com/u/Arbab_Nazar1)\
**Post date:** [September 25, 2018, 4:25pm UTC](https://forum.ansible.com/t/warning-module-remote-tmp-root-ansible-tmp-did-not-exist-and-was-created-with-a-mode-of-0700/28646/1 "2018-09-25T16:25:29Z")

</div>

I am in the process of porting my code from ansible 2.4.2 to ansible 2.6.x and getting of a lot of this warning,

[WARNING]: Module remote\_tmp /root/.ansible/tmp did not exist and was created with a mode of 0700, this may cause issues when running as another user. To avoid this, create the  
remote\_tmp dir with the correct permissions manually

can someone let me know how to fix that warning. Do we need to create the /root/.ansible/tmp ahead or any other fix for this.

advance thanks

---

<div class="post-metadata">

**Author:** ![Guillaume\_Jeanne](https://avatars.discourse-cdn.com/v4/letter/g/f05b48/32.png) [@Guillaume\_Jeanne](https://forum.ansible.com/u/Guillaume_Jeanne)\
**Post date:** [September 25, 2018, 4:53pm UTC](https://forum.ansible.com/t/warning-module-remote-tmp-root-ansible-tmp-did-not-exist-and-was-created-with-a-mode-of-0700/28646/2 "2018-09-25T16:53:37Z")

</div>

Yes if you read carrefuly the warning, it tell you to create it manually.

---

<div class="post-metadata">

**Author:** ![Barry\_Kaplan](https://avatars.discourse-cdn.com/v4/letter/b/48db29/32.png) [@Barry\_Kaplan](https://forum.ansible.com/u/Barry_Kaplan)\
**Post date:** [October 17, 2018, 3:40pm UTC](https://forum.ansible.com/t/warning-module-remote-tmp-root-ansible-tmp-did-not-exist-and-was-created-with-a-mode-of-0700/28646/3 "2018-10-17T15:40:35Z")

</div>

What would be the “correct permissions” in this case?

---

<div class="post-metadata">

**Author:** ![Yuri\_Kanivetsky](https://avatars.discourse-cdn.com/v4/letter/y/b3f665/32.png) [@Yuri\_Kanivetsky](https://forum.ansible.com/u/Yuri_Kanivetsky)\
**Post date:** [January 23, 2019, 12:44pm UTC](https://forum.ansible.com/t/warning-module-remote-tmp-root-ansible-tmp-did-not-exist-and-was-created-with-a-mode-of-0700/28646/4 "2019-01-23T12:44:20Z")

</div>

Yeah, that is not really clear.

---

<div class="post-metadata">

**Author:** ![Yuri\_Kanivetsky](https://avatars.discourse-cdn.com/v4/letter/y/b3f665/32.png) [@Yuri\_Kanivetsky](https://forum.ansible.com/u/Yuri_Kanivetsky)\
**Post date:** [January 23, 2019, 1:13pm UTC](https://forum.ansible.com/t/warning-module-remote-tmp-root-ansible-tmp-did-not-exist-and-was-created-with-a-mode-of-0700/28646/5 "2019-01-23T13:13:43Z")

</div>

On second thought the idea is probably that the user is made responsible for choosing correct permissions. Most of the time the default behavior of autocreating the dir is probably enough. Except that you might want to get rid of the warning. But not always.

Let’s consider my case. My playbook contains a bunch of tasks performed under the root account, then a site/app user is created, and there follows another bunch of tasks for the just created user. If all the following tasks are performed under one account, then the user is to be the owner, and permission 0700. If not, you’ve got to make this directory writable for all involved parties. Or so my understanding is.

The interesting thing is that the warning is not displayed before running root tasks. But that is probably since I connect as root, not connect as one user and switch to another one.
