title: Can I modify the ownership for a shared folder in vagrant?
body: <p>I use <em>vagrant</em> and <em>chef</em> to develop my own blog in a virtual machine. To have easy access to the wordpress folder I created a shared folder.</p>
  
  <p>Basically the wordpress folder is on my host and gets mounted as <em>shared folder</em> in /var/www/wordpress in the VM. The configuration is similar to:</p>
  
  <pre><code>config.vm.share_folder "foo", "/guest/path", "/host/path"
  </code></pre>
  
  <p>My problem is that the ownership in my VM is always <code>vagrant:vagrant</code> even if I change it on my host. Ownership changes in the VM get ignored.</p>
  
  <p>I cannot use <code>chown</code> to set the ownership of the upload directory to <code>www-data:www-data</code>.</p>
  
  <p>It is possible to use <code>chmod</code> and change the access restrictions to <code>777</code>, but this is a really ugly hack.</p>
  
  <p>Here is what I actually want. Is this possible?:</p>
  
  <ul>
  <li>Development: Access to the shared folder from my host.</li>
  <li>Access Restriction: On the VM all files and folders should have proper and secure ownership and access restrictions.</li>
  </ul>