Capifony setfacl permissions: "Operation not permitted" Capifony setfacl permissions: "Operation not permitted" nginx nginx

Capifony setfacl permissions: "Operation not permitted"


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


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


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.