Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Trying to get a Symfony2 project up and running with a vagrant VM. I've seen a zillion articles on this, but getting the cache directory permissioned correctly is proving to be excruciatingly painful.

In my Vagrantfile:

config.vm.share_folder("src", "/var/www", "../www")

My VM's fstab file:

proc            /proc           proc    nodev,noexec,nosuid 0       0
/dev/mapper/ubuntu--1110-root /               ext4    acl,errors=remount-ro 0       1
# /boot was on /dev/sda1 during installation
UUID=4ed7eaaf-6f42-48ba-b5ed-f0c1df9add38 /boot           ext2    defaults        0       2
/dev/mapper/ubuntu--1110-swap_1 none            swap    sw              0       0

The acl package has been installed on the VM.

When I run the following in /var/www as per the Symfony2 install directions:

 sudo setfacl -R -m u:apache:rwx -m u:username:rwx app/cache app/logs

I get:

Operation not supported

I can run the command on any other directory or file on the FS (outside of the shared directory) and the command works. What gives?

share|improve this question
This didn't solve the actual problem, but executed this work around for now:… – Josh Nankin Apr 27 '12 at 17:26

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.

share|improve this answer

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

For example in a roles defintion:

    "apache" => {
      "user" => "vagrant",
      "group" => "vagrant"

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.