title: Salt state to change permissions on a single existing file
body: <p>I know this is probably something super easy that I am just overlooking. For the life of me, I don't see an existing salt state that one can use to simply change the permissions on an already existing file. There's a file.managed state that can be used to "create" a file based on source but what if you just want to insure the permissions on a file that is not created through salt has the correct permission and update them if not.</p>
  
  <p>For example, I can create a state like the following:</p>
  
  <pre><code>base security tcpd host-allows:
    file.managed:
      - name: /etc/hosts.allow
      - create: False
      - user: root
      - group: root
      - mode: 644
  </code></pre>
  
  <p>However, when I apply this state, I get a warning:</p>
  
  <pre><code>[WARNING ] State for file: /etc/hosts.allow - Neither 'source' nor 'contents' nor 'contents_pillar' nor 'contents_grains' was defined, yet 'replace' was set to 'True'. As there is no source to replace the file with, 'replace' has been set to 'False' to avoid reading the file unnecessarily.
  </code></pre>
  
  <p>Is there a better way to handle something like this?</p>