# set projetc access rights
# add current user to www-data group and inverse for complient access file rights
sudo usermod -a -G $(whoami) www-data
sudo usermod -a -G www-data $(whoami)
# set owner of project as www-data
sudo chown -R www-data:www-data $projectDestPath
sudo chmod -R u+rw,g+srw,o+r $projectDestPath
# permissions for futures files and folder.
sudo setfacl -dR -m u:"www-data":rwX -m u:$(whoami):rwX $projectDestPath
# permissions for existing files and folder (maybe duplicate with previous chmod)
sudo setfacl -R -m u:"www-data":rwX -m u:$(whoami):rwX $projectDestPath