# Checking file permission using stat.mode

**URL:** <https://forum.ansible.com/t/checking-file-permission-using-stat-mode/20854>\
**Category:** Ansible Project\
**Created:** [March 13, 2016, 4:56pm UTC](https://forum.ansible.com/t/checking-file-permission-using-stat-mode/20854 "2016-03-13T16:56:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joseph\_Gill](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@Joseph\_Gill](https://forum.ansible.com/u/Joseph_Gill)\
**Post date:** [March 13, 2016, 4:56pm UTC](https://forum.ansible.com/t/checking-file-permission-using-stat-mode/20854/1 "2016-03-13T16:56:56Z")

</div>

Would anyone have the syntax of stat.mode? I’m trying to check the permissions of a file using ansible 1.9.4 but I’'m getting the error:

fatal: [[USSLTCSNL5039.solutions.glbsnet.com](http://USSLTCSNL5039.solutions.glbsnet.com)] =\> error while evaluating conditional: foo\_conf\_file.stat.mode == ‘0600’

FATAL: all hosts have already failed – aborting

Thank you
