I'm using a CentOS for serving PHP webpages.
I have various websites inside "/svr/www"... My problem is that I created folders like:
/svr/www/website1.com
/svr/www/website2.com
And this folders have as owner "root" user, and I noticed that apache can't create new files inside this folders.
I have this errors in apache error.log:
[Sat Oct 22 17:50:44 2011] [error] [client xx.xxx.xxx.xxx] PHP Warning: fopen(../index.htm): failed to open stream: Permission denied in /srv/www/site1.com/public/gne/gnerate.php on line 228
[Sat Oct 22 17:50:44 2011] [error] [client xx.xxx.xxx.xxx] PHP Warning: fputs() expects parameter 1 to be resource, boolean given in /srv/www/site1.com/public/gne/gnerate.php on line 229
[Sat Oct 22 17:50:44 2011] [error] [client xx.xxx.xxx.xxx] PHP Warning: fclose() expects parameter 1 to be resource, boolean given in /srv/www/site1.com/public/gne/gnerate.php on line 230
My question is... What is the correct way to setup permissions in folders that apache need to read, write and execute?
Some clue on this?
Best Regards,