Results 1 to 8 of 8

Thread: Error 403 in Apache 2 has me stalled

  1. #1
    David Guest

    Default Error 403 in Apache 2 has me stalled

    Hello all:

    I'm new to Linux, but have SUSE Linux 10.0 up and running, experimenting
    with it as a web server on a LAN.

    I'm stumpped with what I think is a very simple problem.

    When attempting to view pages either locally (http://127.0.0.1) using
    Firefox or through a WINXP machine on the LAN (http://192.168.1.133) using
    Explorer I receive the same error "Error 403: Access Forbidden".

    The error log reads the same for both attempts:

    "(13)Permission denied: file permissions deny server access:
    /srv/www/htdocs/index.html:

    The SUSE Linux Reference Manual (suse10_ref.pdf) states: "By default in
    SUSE Linux, the DocumentRoot directory /srv/www/htdocs and the CGI directory
    /srv/www/cgi-bin belong to the user root. You should not change these
    permissions." (Page 711 "46.6 SecurityocumentRoot Permissions")

    I checked permissions on the directory "/srv/www"; file owner is "root",
    file group is "root" and text view of permissions is "drwrx-xr-x".

    What am I missing here?

    Thanks!



  2. #2
    Jim Pye Guest

    Default Re: Error 403 in Apache 2 has me stalled

    David wrote:

    > Hello all:
    >
    > I'm new to Linux, but have SUSE Linux 10.0 up and running, experimenting
    > with it as a web server on a LAN.
    >
    > I'm stumpped with what I think is a very simple problem.
    >
    > When attempting to view pages either locally (http://127.0.0.1) using
    > Firefox or through a WINXP machine on the LAN (http://192.168.1.133) using
    > Explorer I receive the same error "Error 403: Access Forbidden".
    >
    > The error log reads the same for both attempts:
    >
    > "(13)Permission denied: file permissions deny server access:
    > /srv/www/htdocs/index.html:
    >
    > The SUSE Linux Reference Manual (suse10_ref.pdf) states: "By default in
    > SUSE Linux, the DocumentRoot directory /srv/www/htdocs and the CGI
    > directory
    > /srv/www/cgi-bin belong to the user root. You should not change these
    > permissions." (Page 711 "46.6 SecurityocumentRoot Permissions")
    >
    > I checked permissions on the directory "/srv/www"; file owner is "root",
    > file group is "root" and text view of permissions is "drwrx-xr-x".
    >
    > What am I missing here?
    >
    > Thanks!

    David

    You need to check further down the directory structure as well.

    The htdocs directory and the index.html file need to have the permissions
    correct as well.

    The files are owned by root.root but the web server actually runs as another
    user (wwwrun IIRC) which makes the world (or others) the important
    permission. If the world cannot read the files ie -r-----r-- on the
    index.html at minimum, then the webserver will not be able to access the
    file and therefore produces the 403 error.

    HTH
    Jim

    --
    Pye, James Pye, chmod 007
    The Ultimate Open Source

  3. #3
    David Guest

    Default Re: Error 403 in Apache 2 has me stalled

    That was it!

    Just changed permissions on index.html to -rwxr-xr-- and it works like a
    charm.

    Thanks Jim!



  4. #4
    Jim Pye Guest

    Default Re: Error 403 in Apache 2 has me stalled

    David wrote:

    > That was it!
    >
    > Just changed permissions on index.html to -rwxr-xr-- and it works like a
    > charm.
    >
    > Thanks Jim!

    No problems

    I have a script that resets all permissions to the correct ones which I run
    after doing updates on my website to make sure all files and directories
    are consistent.

    One point of note. The x permission should not be needed on the files as
    this designates them as executable which is not necessary for html files.
    However the x permission is needed for directories otherwise you or the
    user the web server is running as cannot change into the directory.

    Jim

    --
    Pye, James Pye, chmod 007
    The Ultimate Open Source

  5. #5
    Steve Thompson Guest

    Default Re: Error 403 in Apache 2 has me stalled

    On Sat, 02 Sep 2006 02:48:23 +0000, Jim Pye wrote:

    > David wrote:
    >
    >> That was it!
    >>
    >> Just changed permissions on index.html to -rwxr-xr-- and it works like a
    >> charm.
    >>
    >> Thanks Jim!

    > No problems
    >
    > I have a script that resets all permissions to the correct ones which I run
    > after doing updates on my website to make sure all files and directories
    > are consistent.
    >
    > One point of note. The x permission should not be needed on the files as
    > this designates them as executable which is not necessary for html files.
    > However the x permission is needed for directories otherwise you or the
    > user the web server is running as cannot change into the directory.
    >
    > Jim


    Hi Jim,

    I would'nt mind getting a hold of that script. Any chance you can forward
    that to me or the group?

    --
    Steve,

    In the beginning the Universe was created.
    This has been widely regarded as a bad move. - Douglas Adams


  6. #6
    Kevin Nathan Guest

    Default Re: Error 403 in Apache 2 has me stalled

    On Sat, 02 Sep 2006 03:01:11 GMT
    Steve Thompson <sthompson@creativewebnet.com> wrote:

    > I would'nt mind getting a hold of that script. Any chance you can
    > forward that to me or the group?
    >


    Or, you could look through the /etc/permissions* files and make your
    local changes in /etc/permissions.local . . . :-)


    --
    Kevin Nathan (Arizona, USA)
    Linux is not a destination, it's a journey -- enjoy the trip!

    Linux 2.6.13-15.11-default
    8:07pm up 25 days 21:23, 13 users, load average: 0.28, 0.12, 0.10

  7. #7
    Jim Pye Guest

    Default Re: Error 403 in Apache 2 has me stalled

    Steve Thompson wrote:

    > On Sat, 02 Sep 2006 02:48:23 +0000, Jim Pye wrote:
    >
    >> David wrote:
    >>
    >>> That was it!
    >>>
    >>> Just changed permissions on index.html to -rwxr-xr-- and it works like a
    >>> charm.
    >>>
    >>> Thanks Jim!

    >> No problems
    >>
    >> I have a script that resets all permissions to the correct ones which I
    >> run after doing updates on my website to make sure all files and
    >> directories are consistent.
    >>
    >> One point of note. The x permission should not be needed on the files as
    >> this designates them as executable which is not necessary for html files.
    >> However the x permission is needed for directories otherwise you or the
    >> user the web server is running as cannot change into the directory.
    >>
    >> Jim

    >
    > Hi Jim,
    >
    > I would'nt mind getting a hold of that script. Any chance you can forward
    > that to me or the group?
    >

    Steve

    Check out:

    http://www.pyenet.co.nz/develop/permissions.html

    Cheers
    Jim


    --
    Pye, James Pye, chmod 007
    The Ultimate Open Source

  8. #8
    Steve Thompson Guest

    Default Re: Error 403 in Apache 2 has me stalled

    On Sat, 02 Sep 2006 23:43:13 +0000, Jim Pye wrote:

    > Steve Thompson wrote:
    >
    >> On Sat, 02 Sep 2006 02:48:23 +0000, Jim Pye wrote:
    >>
    >>> David wrote:
    >>>
    >>>> That was it!
    >>>>
    >>>> Just changed permissions on index.html to -rwxr-xr-- and it works like a
    >>>> charm.
    >>>>
    >>>> Thanks Jim!
    >>> No problems
    >>>
    >>> I have a script that resets all permissions to the correct ones which I
    >>> run after doing updates on my website to make sure all files and
    >>> directories are consistent.
    >>>
    >>> One point of note. The x permission should not be needed on the files as
    >>> this designates them as executable which is not necessary for html files.
    >>> However the x permission is needed for directories otherwise you or the
    >>> user the web server is running as cannot change into the directory.
    >>>
    >>> Jim

    >>
    >> Hi Jim,
    >>
    >> I would'nt mind getting a hold of that script. Any chance you can forward
    >> that to me or the group?
    >>

    > Steve
    >
    > Check out:
    >
    > http://www.pyenet.co.nz/develop/permissions.html
    >
    > Cheers
    > Jim


    Thanks Jim. Much appreciated.

    --
    Steve,

    In the beginning the Universe was created.
    This has been widely regarded as a bad move. - Douglas Adams


Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.5.2