Its working like this.
On 11/01/13 21:07, [email protected] wrote:
in the /var/www directory i have all site webroot like:
every folder have the connected php-fpm user rights like owner and group
so domain.tld folder user and group is domain.tld
and have 0755 permission, so only the owner can write group and
else just read.
I want to restrict this to that only thy owner/group can enter this
directory, so i need 0750 flag.
In that case the web site no longer loaded i see 404 error and in the
files a permission denied error.
Then i realize i need to gain access to the www-data too, because this
user try to enter to the main directory.
So i add www-data to the domain.tld group, but same problem. I all can
the permission denied.
If i set back the 0755 permission, so everybody can read/enter this
directory it will working again.
Is there any way to set a permission that the web page working fine but
the directory only accessible by the owner and www-data and root?
Thx for the help!
chgrp -R www-data .
find . -type d | xargs chmod 2750
will provide and future proof read access to the web server. I assume
there is a dedicated php-fpm process for each site, running as the