# Why file fail when directory exists?

**URL:** <https://forum.ansible.com/t/why-file-fail-when-directory-exists/26754>\
**Category:** Ansible Project\
**Created:** [February 15, 2018, 11:33pm UTC](https://forum.ansible.com/t/why-file-fail-when-directory-exists/26754 "2018-02-15T23:33:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![LeamHall](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/leamhall/32/9390_2.png) [@LeamHall](https://forum.ansible.com/u/LeamHall)\
**Post date:** [February 15, 2018, 11:33pm UTC](https://forum.ansible.com/t/why-file-fail-when-directory-exists/26754/1 "2018-02-15T23:33:52Z")

</div>

I’m creating a mount point for an ISO image, and a later task puts the mount point in fstab. Why is the file module erroring after the ISO is mounted? The directory exists so the task shouldn’t try to recreate it.

---

<div class="post-metadata">

**Author:** ![LeamHall](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/leamhall/32/9390_2.png) [@LeamHall](https://forum.ansible.com/u/LeamHall)\
**Post date:** [February 20, 2018, 12:00pm UTC](https://forum.ansible.com/t/why-file-fail-when-directory-exists/26754/2 "2018-02-20T12:00:38Z")

</div>

Figured it out; the playbook was trying to make the directory permission 0755 when the mounted fs is 0555.
