title: Apache creating/writing directories in Vagrant
body: <p>I have the following vagrant share setup:</p>
  
  <pre><code>config.vm.synced_folder "~/web", "/opt/subversion/web"
  </code></pre>
  
  <p>One of my pages, opens zip files and extracts them to a directory, lets say:</p>
  
  <pre><code>/opt/subversion/web/extracts/
  </code></pre>
  
  <p>When we look at the directory from inside the VM, it looks like this:</p>
  
  <pre><code>drwxrwxrwx 1 vagrant vagrant 136 Jul 23 13:31 extracts
  </code></pre>
  
  <p>When we look at the directory on the host, it looks like this:</p>
  
  <pre><code>drwxrwxrwx  4 garth  staff  136 Jul 23 15:31 extracts
  </code></pre>
  
  <p>The web page then creates a directory to store the contents on the zip file in the 'extracts' directory (VM View):</p>
  
  <pre><code>drwxr-xr-x 1 vagrant vagrant 68 Jul 23 13:31 ZipExtractDir
  </code></pre>
  
  <p>From there I get permission denied when trying to write files inside that directory from apache/web page.</p>
  
  <p>I never had this problem before with my Vagrant V1 install, but my shares were done with the :nfs=>true attribute for the sync_folder option. We're now using a "global" dev install of vagrant that is admined via puppet, with "config.vm.network :public_network"</p>
  
  <p>Do I have to have the nfs setup, or is there something else wrong here and the reason why apache is create directories as "vagrant", rather than "apache". I'm assuming we can't write to the directory because it's created with the owner "vagrant" rather than "apache" and then when apache tries to write to the directory, it gets a permission denied error. Can I even setup nfs with vagrant using DHCP, or do I have to have a static IP?</p>
  
  <p>For reference, the apache is setup to use the apache user. I've also checked /etc/selinux/config and it is set SELINUX=disabled</p>