Results 1 to 7 of 7

Thread: Apache 403 forbidden error to access folders

  1. #1
    Join Date
    Oct 2009
    Location
    India
    Beans
    18
    Distro
    Ubuntu 10.04 Lucid Lynx

    Post Apache 403 forbidden error to access folders

    Hello.....
    Just after the successfully installation of Apache+PHP5+MySQL in my new Ubuntu 9.10 (By this link : https://help.ubuntu.com/community/ApacheMySQLPHP ) when i tried to use Codeigniter by coping the Codeigniter files to my new config. root folder (/home/user/public_html/) and when tried to execute that http://localhost/ci/index.php (ci= codeigniter folder) it is showing an error of .....

    403 Forbidden

    You don't have permission to access /ci/index.php on this server.
    Apache/2.2.12 (Ubuntu) Server at localhost Port 80


    ------------------------------------------------------------------------------------------------------
    Guys, can any body tell me what's going wrong at where & how i can solve this problem. I tried a lot in Google bit didn't able to get any perfect solution.

  2. #2
    wojox is offline I Ubuntu, Therefore, I Am
    Join Date
    Apr 2009
    Beans
    8,628

    Re: Apache 403 forbidden error to access folders

    You followed this part to the T?

    Did you make a /home/user/public_html/ci/ and then change DocumentRoot to point there?

  3. #3
    Join Date
    Oct 2009
    Location
    India
    Beans
    18
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Apache 403 forbidden error to access folders

    No.....
    First i change the Document root to this path : /home/user/public_html/ by following this link https://help.ubuntu.com/community/ApacheMySQLPHP
    Then i download the Codeigniter rar file and extrat that to Codeigniter folder & rename the Codeigniter folder to ci. Then i copy the ci folder to /home/user/public_html/. After this when i tried to run the index.php file in my browser whihc is present inside of that ci folder by this url http://localhost/ci/index.php i got that error

  4. #4
    Join Date
    Feb 2010
    Beans
    55

    Re: Apache 403 forbidden error to access folders

    Hi there.
    There might be the permission problem for not setting the right permission.
    To solve your problem, may be the following URL will help:
    http://www.webtechquery.com/index.ph...-ubuntu-linux/

    And if still your problem does not solve, then make one thing sure that your http://localhost is working fine. If even http://localhost is also not working fine, then I suggest you to re-install the LAMP (Linux Apache MySql Php) on your system. To get help on how to install LAMP, check the URL below:
    http://www.webtechquery.com/index.ph...-ubuntu-linux/

    For any further queries, contact me.

    Thanx.

  5. #5
    Join Date
    Jan 2008
    Beans
    17

    Re: Apache 403 forbidden error to access folders

    Hi, not sure if I should have started my own thread on this, but it kind of just takes off from the same point.

    I have apache 2.2.14 installed. The default website works fine at localhost. If I change the default conf file to a different directory (/home/jacob/Workspace/www) I get the 403 error. I changed the permissions to a+rwx and I get the same error. Not sure how I could get the permissions error when the directory is set so that

    The user and group of apache is www-data by default. If I change this to jacob or root in envvars the server works, but I am pretty sure I shouldn't keep it that way for safety reasons.

    I tried to replicate the /var/www directory which is what the default path was. The owner and group are root, so I changed my /home/jacob/Workspace/www to root, still doesn't work. I then tried to change it to www-data, and it still doesn't work.

    So I am out of ideas and I thought I had a good understanding of the problem, but apparently not.

    Any ideas? Thanks,

    Jacob

    note:
    I am pretty sure that, in the end, apache should have its own user and group, the owner of the new www directory should be jacob, the group should be www-data, and group www-data and other users should only have read privileges. I would like to get to that point.

    If any of this sounds wrong please let me know.
    Last edited by jmblock2; June 6th, 2010 at 05:06 PM.

  6. #6
    Join Date
    Jan 2008
    Beans
    17

    Re: Apache 403 forbidden error to access folders

    Ah, I figured out that my problem was the parent directory of www also needed to be set to www-data.

    I still don't understand why, but once I did that the index.html displayed.

  7. #7
    Join Date
    Nov 2010
    Beans
    6

    Re: Apache 403 forbidden error to access folders

    Quote Originally Posted by jmblock2 View Post
    Ah, I figured out that my problem was the parent directory of www also needed to be set to www-data.

    I still don't understand why, but once I did that the index.html displayed.
    Thanks, man... you saved me like 2 hrs of banging my head on the wall

    BTW, I don't understand either, why the parent folder needs read permissions too...

Tags for this Thread

Bookmarks

Posting Permissions

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