Apache Root Directory Owner/Permissions

I’m new to Linux / SUSE, I have started to set up my directory structure (hosting off a raid with custom driver so I wasn’t able to set it to mount as /srv during install). Right now I have:
/goliath/srv/www/htdocs/index.html
Right now everything is owned by root, I know I need to change the owner and permissions starting somewhere, but I don’t know what apache’s user name is nor default permissions for said user, nor what directory it should start at.

Help please and thank you:P

Hi,

On 2009-02-24, MrVining <MrVining@no-mx.forums.opensuse.org> wrote:
> /goliath/srv/www/htdocs/index.html
> Right now everything is owned by root, I know I need to change the
> owner and permissions starting somewhere, but I don’t know what apache’s
> user name is nor default permissions for said user, nor what directory
> it should start at.

The owner is irrelevant as long as it’s readable by apache’s user, which
is wwwrun. Of course for writing to a directory, you need to give ownership
and/or write permission to wwwrun.

kind regards,
Andreas Stieger

Okay so wwwrun is the user apache runs under, I guess that was my main question.

Thank you for your response.

PS
Somehow I posted this under Apps, not Network. Sorry I would move it if I could.

Okay so here is what I did:


# chown -Rv wwwrun:www /goliath/srv/www
# find /goliath/srv/www -type d -exec chmod -v 755 {} \;
# find /goliath/srv/www -type f -exec chmod -v 644 {} \;

I watched the verbose report, and all looked well. Or at least I thought it did… but when I hopped over to another computer on the LAN and typed in servers ip address in firefox I get the same old “Access forbidden!” Just for the heck of it I chmod -R 777 /goliath/srv/www and still getting “Access forbidden!”

If you are putting your webserver content under a different directory, you should edit /etc/apache2/default-server.conf and change the DocumentRoot and the <Directory> clause.

Yes I did that originally from yast, but I checked the path is right under DocumentRoot, and in the Directory statement.