Today to my great surprise I notices that my Apache web server randomly returns 403 Forbidden HTTP error code to search engine robots. Yandex Search Engine reported that on my favorite website 263 pages are OK and 210 pages has 403 status and some other site has 394/139 pages respectively.
In Apache error logs I found the following messages:
Permission denied: /home/<site-name>/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
as far as I see they appears whenever this 403 error is reported.
By default Apache 2 is configured in a way that phpmyadmin is automatically included to all the hosted web sites. For example, if I create a new site ‘site.com’, and then navigate to this address:
the phpmyadmin login page appears.
Running Apache virtual hosts as different users
By default, Apache on Ubuntu executes all PHP scripts under www-data user, hence in situations where multiple mutually distrusting users have the possibility to put their PHP scripts on the server they could potentially spy on each other private data.
For example, the user user1 could put a PHP script that access file ‘file1.txt’ belonging to user2: