I have set up 4 websites inside the /var/www/html/ folder.
Now the permissions are root:www-data with 755 and supposed to be recursive. However, when uploading data from my account harleyfrank it just sets permissions for me and I get an apache error because of the permissions.
I followed these websites:
But the weird thing is that it is appling harleyfrank:www-data with read write permissions only to harleyfrank. I am not sure how to get it fixed.
To fix it use the
setfacl comamnd to set the permissions and default owners:
sudo setfacl -d -R -m u:root:rwx,g:www-data:rw,o::r /var/www/html
-d: set as default so new folders will inherit it automatically
-m: modify existing permissions and ownerships
u:root:rwX: give user
rwxon the folders and files
g:www-data:rw: give user
www-datarw on the folders
o::r: give others
readrights on folders