I have a user didongo
(user & group didongo
), and the nginx server (user & group www-data
). I\'ve setup Capifony to login as <
The problem here, is that prod.log
file was created automatically so its owner is www-data
. Capifony runs deployment as didongo
user. One user can't do setfacl
to the other owner's file.
So just add didongo
to the group www-data
: sudo adduser didongo www-data
Try this once with sudo and after you will no need to use sudo
sudo sh -c 'setfacl -R -m u:didongo:rwX -m u:www-data:rwX /home/didongo/staging/shared/app/logs'
Because you need to set x+
permissions, read this What is trailing Plus indicates
Finally I managed this creating different PHP-FPM pools with the same permissions as the user. This way I can have different users separated from each other. And as a bonus deploy.rb is simplified.