title: chef create file in user's home directory
body: <p>I'm using chef to create a file resource</p>
  
  <pre><code>  file "somefile" do
       action :create_if_missing
    end
  </code></pre>
  
  <p>And I want to put this in the user's home directory. I am having two issues:</p>
  
  <ol>
  <li>The file is interpreted relative to /, so using ~/ ends up putting the file in /~/</li>
  <li>I'm launching this chef recipe through vagrant and these files are being created by root. So even if I could get ~/ to work, it would end up in root's home. I don't want to hard code to use the username vagrant since it won't always be that (we may run these with chef client as well), and <code>node[:user]</code> appears to be empty.</li>
  </ol>
  
  <p>Is there a way to create a file in the non-root user (in this case vagrant) home directory?</p>