Results 1 to 6 of 6

Thread: Apache Root Directory Owner/Permissions

  1. #1

    Default 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

  2. #2

    Default Re: Apache Root Directory Owner/Permissions

    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

  3. #3

    Default Re: Apache Root Directory Owner/Permissions

    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.

  4. #4

    Default Re: Apache Root Directory Owner/Permissions

    Okay so here is what I did:
    Code:
    # 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!"

  5. #5
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Apache Root Directory Owner/Permissions

    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.

  6. #6

    Default Re: Apache Root Directory Owner/Permissions

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •