SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Forbidden directories after fresh install

  1. #1
    SitePoint Zealot mrtopher's Avatar
    Join Date
    Mar 2004
    Location
    VA
    Posts
    150
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Forbidden directories after fresh install

    I just installed Apache 2.2.3 on CentOS5 and things appear to have worked properly. I was able to put an index.html file in the web root and view it appropriately.

    The problem I'm experiencing is that I can't put any folders inside the web root because when I try to bring them up in a browser I am getting a Forbidden error. I can't seem to gain access into any subdirectories I place inside the web root. I have checked permissions and such and I can't see any difference between the permissions of those directories and the files in the root.

    Do I need to make any changes to the httpd.conf file from it's default settings? Anyone know what I'm doing wrong?
    The blog: ChrisMonnat.com

  2. #2
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,313
    Mentioned
    15 Post(s)
    Tagged
    2 Thread(s)
    top,

    'nix is a different beast and actually knows how to handle file security far better than WinDoze. In other words, it sounds like a chmod problem which you can get around using a root account (not a smart thing) or setting permissions differently. Apache SHOULD be protected from attacks with file permissions and run as its own owner - which means that you (as a user) have no rights in its directories except those set (which would NOT include write).

    IMHO (and LinhGB will correct me when he comes by - he's an Apache Admin on a university's 'nix system), create separate directories UNDER htdocs for each of your domains and assign their ownership to you as a user. Change your httpd.conf to add a VirtualHost for each domain and update your hosts file accordingly.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    Updated mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

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
  •