Thanks for the guide very informative. I've run into a bit of a permission issue I'm hoping you can shed some light.
If I run your fixperms script, all is good except when I go to upgrade an application, since the files and folders are owned by webapp:webapp I'll get a permission error.
0: Extraction from phar "/tmp/phpZ2rgSN.tar" failed: Cannot extract "Application.php" to "applications/cjmenu/Application.php", setting file permissions failed
if I set the user:group recursively on applications/cjmenu to www-data:www-data the application will upgrade without a hitch.
I thought we shouldn't have an issue since www-data has read and write access through acl ?
here is the output from getfacl applications/
# file: applications/
# owner: webapp
# group: webapp
user::rwx
user:www-data:rwx
user:nginx:r-x
group::r-x
mask::rwx
other::---
default:user::rwx
default:user:www-data:rwx
default:user:nginx:r-x
default:group::r-x
default:mask::rwx
default:other::---
Please I'd really like to know why this is happening ?