# Cant save output to file?

**URL:** <https://forum.ansible.com/t/cant-save-output-to-file/31095>\
**Category:** Ansible Developer\
**Created:** [August 21, 2019, 7:07pm UTC](https://forum.ansible.com/t/cant-save-output-to-file/31095 "2019-08-21T19:07:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steven\_Williams](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@Steven\_Williams](https://forum.ansible.com/u/Steven_Williams)\
**Post date:** [August 21, 2019, 7:07pm UTC](https://forum.ansible.com/t/cant-save-output-to-file/31095/1 "2019-08-21T19:07:57Z")

</div>

Stevens-MacBook-Pro:ansible stevenwiliams$ ansible IOL\_Routers -i ./hosts -m raw -a “show run” -u cisco -k \> filetest

-bash: filetest: Permission denied

Stevens-MacBook-Pro:ansible stevenwiliams$

what am I missing here??

---

<div class="post-metadata">

**Author:** ![Nathan\_Brady](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/nathan_brady/32/8422_2.png) [@Nathan\_Brady](https://forum.ansible.com/u/Nathan_Brady)\
**Post date:** [August 21, 2019, 7:21pm UTC](https://forum.ansible.com/t/cant-save-output-to-file/31095/2 "2019-08-21T19:21:17Z")

</div>

Steven,

I use tee so I can see the output and pass the full path.

eg.  
Stevens-MacBook-Pro:ansible stevenwiliams$ ansible IOL\_Routers -i ./hosts -m raw -a “show run” -u cisco -k **| tee /tmp/filetest**

The issue may be with the directory permissions.

---

<div class="post-metadata">

**Author:** ![Steven\_Williams](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@Steven\_Williams](https://forum.ansible.com/u/Steven_Williams)\
**Post date:** [August 21, 2019, 8:59pm UTC](https://forum.ansible.com/t/cant-save-output-to-file/31095/3 "2019-08-21T20:59:10Z")

</div>

Issue was permissions within the ansible folder itself. directed to another directory and it worked.
