running setfacl on a vagrant shared directory

Solution 1:

To bypass all the permission problems with Symfony2 and Vagrant, the easiest solution is to change the user and group running apache to vagrant. To do so, edit the file /etc/apache2/envvars and replace lines 16 and 17 with these: export APACHE_RUN_USER=vagrant export APACHE_RUN_GROUP=vagrant Note that these instructions are for apache 2.2 on Ubuntu, refer on your apache and OS version to do so.

If you don't want to change apache user and group, you could also mount a ramdisk and put your symfony project on it. Then vagrant can modify the permissions on this disk. See this link for instructions on how to mount a ramdisk.

Solution 2:

A better solution is using Attribute Overriding. See Opscode Wiki.

For example in a roles defintion:

override_attributes({
    "apache" => {
      "user" => "vagrant",
      "group" => "vagrant"
    }
})

I had the same problem with Typo3 in a shared Folder, failing to create temporary files.