This question already has an answer here:
My server is
My website locate in
apache is the only one user read or write in
/var/www,I set all files and folders owner and group to
For the folders and files read only:
-r------- 1 apache apache 922 Jun 3 2014 connect.php
For the files need to be write:
-rw------- 1 apache apache 922 Jun 3 2014 connect.php
Which means only
400 for files permission.(*.php need not
As to folders permission, only
This should be the best practice, because provide permission as little ad possible.
Is there any security issue?