Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Apache problem

  • 26-02-2004 11:07pm
    #1
    Banned (with Prison Access) Posts: 13,018 ✭✭✭✭


    didnt know where to put this so ill start here

    im just after installing apache2.0 on red hat9

    all seems well but when i try and access the sample web page( i do this by ip number eg 157.190.xxx.xxx) then i get a forbidden message saying i dont have permission to access the \ directory i changed all the file permissions via chmod - R 755 [filename]

    im after changing the web directory to root/myname/www where i have an html file called index there but it aint happining for me

    i goggled this but cant seem to find any answers at all

    i pressume its something in the httpd.conf file that is wrong

    small problem but very annoying
    any ideas?


Comments

  • Subscribers Posts: 1,911 ✭✭✭Draco


    what's the DocumentRoot set in your httpd.conf? make sure that directory and the files in are readable by the apache user.


  • Banned (with Prison Access) Posts: 16,659 ✭✭✭✭dahamsta


    What platform are you on? What does the error log say?

    adam


  • Banned (with Prison Access) Posts: 13,018 ✭✭✭✭jank


    platform is red hat 9 kernal 2.4.x
    the error log says

    "[Fri Feb 27 15:57:13 2004] [error] [client 157.190.181.57] (13)Permission denied: access to / denied"

    the web page also says that ""Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.""
    my document root is set to
    DocumentRoot "/root/myname/www/"

    i have a webpage called index.html in www

    with permissions set to 755 for all is that what you mean by readable

    however does the file owner or group have anything to do with this at all??


  • Closed Accounts Posts: 9,700 ✭✭✭tricky D


    644 for files, 755 for dirs and scripts, in general (why would you want to execute a static html file)

    sounds like ownership/group mismatching to me. ownership is important, not just of the files but also who runs the process (check for httpd process owner using ps -aux)

    there are a few combos for doing it: some run httpd as nobody, www, httpd, username or even root (don't unless... nah just don't).

    google for "setting up apache" +ownership or +permissions and maybe +tutorial and see which advice/tutorial best suits the lie of your land

    hth
    \r


  • Banned (with Prison Access) Posts: 13,018 ✭✭✭✭jank


    yea i did that (ps -aux)
    one process is root and 4 are nobody

    i the httpd.conf file i changed the ownership to

    ""User nobody
    Group root""

    this seems to have got ridden of the error ""Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request""

    but the main error of ""You don't have permission to access / on this server"" remains :(

    i also changed the ownership and group to the www folder where my html file is located to

    file owner nobody
    file group root

    to match the configuration i have in httpd.conf but still no luck


    just not may day with this stuff:dunno:


  • Advertisement
  • Banned (with Prison Access) Posts: 13,018 ✭✭✭✭jank


    whooo hoo got it going at last
    i copied over the conf file i had with a back up and then changed the user and the group

    reverted my dir back to the default and hey presto it worked
    must have doen soemthign wierd in there at the start that denied all access!?

    you have to put an exe permission on the folder the pages are in and have the ownership and the groups matching with the same (i have mine as nobody, nobody)

    thats all really just took some time finding out

    cheers for teh help lads


  • Subscribers Posts: 1,911 ✭✭✭Draco


    what could have been wrong is that in the Directory config for /root/myname/www wasn't setup properly - missing something like the following:

    Order deny,allow
    Deny from all
    Allow from 10.0


Advertisement