I have a fresh install OpenSuSE 11.4 installation. I have install Apache 2 ,I have change the content on the owner and group to chown wwwrun.nobody Directory /srv/www/htdocs.
now apache cannot display the content anymore there is no error in the error_log.
if I change the content to my user the content is displayed …
Can anybody help to understand why and how can I fix this the permission are the same as on the previous web server and I’m using index.php as the index page…
Thanks for any help.
How did you start apache? By going to YaST > Network services > HTTP server or YaST > System System services (runlevel), other?
Show the output of
ps -ef|grep apache
Try chowning to user wwwrun and group www
You’ll see that in the file /etc/apache2/uid.conf
Apache was probably started with service runlevel…
I will try changing the group to www ang get back to you
Does this mean that you are not sure how you did it and that you do not want to show the out put of ps -ef|grep apache ?
below if the output for ps -ef|grep apache
wwwrun 22415 22414 0 10:59 ? 00:00:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun 22416 22414 0 10:59 ? 00:00:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun 22417 22414 0 10:59 ? 00:00:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun 22418 22414 0 10:59 ? 00:00:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun 22422 22414 0 10:59 ? 00:00:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun 22423 22414 0 10:59 ? 00:00:02 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun 22443 22414 0 11:04 ? 00:00:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun 22445 22414 0 11:04 ? 00:00:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun 22592 22414 0 12:05 ? 00:00:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun 22595 22414 0 12:06 ? 00:00:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
and I’m sure I did not use yast to start nor the configure the apache…
would you care to explain why would that make a difference?
Because when you would have used YaST that would have been:
- a simple and sure way to do it;
- a simple and short way to tell us what you did and most of us would understand how it was done
- when you do it otherwise you have to explain a lot because you do have a problem and we have to find out what is different between you and all the other apache users who do not have this problem. After all when doing it “manualy” you could have made all sorts of mistakes.
Of course one can do the same thing as YaST does by editing the same configuration files with the same edits as YaST does and executing the same statements as YaST does, but we more or less know rather exactly what YaST does, not what you did.
And that is why I asked you to see the *ps *output. Only to check for anomalies compared to what e.g. I have like an uncommon process owner (which is not the case btw).
And as a minor remark, please next time when you post computer output, do so between CODE tags (Posting in Code Tags - A Guide ). Not that it is that important with the ps output above, but it may make a big different in the readability in other cases.
And as Swerdna allready explained, users wwwrun and/or the group www must be able to read those files. Most easy to make them the owner/group of the tree down from /srv/www downwards and let root (as the owner of */srv *and /srv/www) have those directories *r-x *for the world (this should be the case allready).
Thanks you Henk
Point well taken…my web server is working better now I have wwwrun with the group www owing the content of htdocs as the upper directory are left to root. It seem my problem I was simply moving the content of my old server BTW is SuSE 9.0 to this new one 11.4 it appears that some app need more that just move from one server to another …
Thank a lot for your help.