I'm trying to setup Vagrant with a Symfony project using the box "ubuntu/trusty64". I have the following inside my provisioning file
echo "Installing acl"
apt-get install acl
mount -o remount,acl /
echo "Setting symfony log and cache permissions"
HTTPDUSER=`ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1`
setfacl -R -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX /var/www/app/cache /var/www/app/logs
setfacl -dR -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX /var/www/app/cache /var/www/app/logs
However setfacl is failing with setfacl: /var/www/app/cache: Operation not supported
If I run mount | grep acl
I can see the root drive which suggests acl is correct setup on the root partition.
Without these permissions setup I am unable to run any of the symfony generator commands.
Check link : http://symfony.com/doc/current/book/installation.html
3. Using ACL on a system that does not support chmod +a
Some systems don't support chmod +a, but do support another utility called setfacl. You may need to enable ACL support on your partition and install setfacl before using it (as is the case with Ubuntu). This uses a command to try to determine your web server user and set it as HTTPDUSER:
$ HTTPDUSER=`ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1`
$ sudo setfacl -R -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX app/cache app/logs
$ sudo setfacl -dR -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX app/cache app/logs
I ended up solving this using the solution here Vagrant folder permissions using nginx which is to change the nginx user to vagrant.