Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    Jan 2003
    Posts
    17

    Default Directory Browsing

    I'm a reseller, new to WHM/CPanel. When my domains started coming online, i started getting emails from clients complaining that the whole world can just go browsing around their directories.

    Is this default behavior for WHM/Cpanel servers? Is there something i can change, or ask my provider to change?

    My clients are justifiably outraged, (one had a forum full of jerks having a party with her image directory), i'm also outraged, but i'm looking all over the web and don't see any other outrage, so i'm wondering if i should have expected it. I didn't expect it because none my servers ever did this before.

    I tried the Web Protect feature in CPanel, but that resulted in requests for passwords for ALL files in protected directories. I don't want to make custom .htaccess for every single dir on every single account. So i threw some dummy 403 index.html pages in everyone's directories, but it just doesnt seem like that should be necessary.

    Thanks for any advice.

  2. #2
    Member
    Join Date
    Nov 2001
    Posts
    65

    Default

    [quote:485299c316][i:485299c316]Originally posted by theDOG[/i:485299c316]I don't want to make custom .htaccess for every single dir on every single account. So i threw some dummy 403 index.html pages in everyone's directories, but it just doesnt seem like that should be necessary.[/quote:485299c316]

    You only need one .htaccess file per user, place it in the webroot directory (public_html) with the line &Options -Indexes& in it. This will disable directory browsing in the webroot directory plus all subdirectories (=whole site). If directory browsing needs to be enabled for a subdirectory, place .htaccess file with &Options Indexes& in it to the directory in question.

    Create identical .htaccess file in your cpanel3-skel/public_html directory so it will get added automagically to all new accounts you create.

  3. #3
    Member
    Join Date
    Jan 2003
    Posts
    17

    Default

    VERY HAPPY COOL!

    Thank You.

    er... do i just make the .htaccess file like that? I mean that's all it needs to say?

  4. #4
    Moderator cPanel Partner NOC Badge dgbaker's Avatar
    Join Date
    Sep 2002
    Location
    Toronto, Ontario Canada
    Posts
    2,773

    Default

    Yep! Also if you want this to be the norm all of the time put the .htaccess in /home and that's all.
    Regards,
    David
    Forum Moderator

  5. #5
    Member
    Join Date
    Mar 2003
    Posts
    17

    Default

    Wouldn't the above solutions break the ability to use the cpanel to add/remove directory browsing?

    I'm sure you are aware that this is an option available to the client with their cPanel pages.

  6. #6
    Moderator cPanel Partner NOC Badge dgbaker's Avatar
    Join Date
    Sep 2002
    Location
    Toronto, Ontario Canada
    Posts
    2,773

    Default

    And this thread was before that was available. Read the dates.
    Regards,
    David
    Forum Moderator

  7. #7
    Member
    Join Date
    Jul 2004
    Posts
    41

    Default -bump-

    Quote Originally Posted by dgbaker
    Yep! Also if you want this to be the norm all of the time put the .htaccess in /home and that's all.
    Thanks, this tip was very helpful. I tested it and discovered not only does it work, but you don't need to restart Apache to activate it.

    Patrick McNeal

Similar Threads & Tags
Similar threads

  1. Directory Browsing not working?
    By SoftDux in forum Enkompass Discussions
    Replies: 5
    Last Post: 02-22-2011, 02:31 PM
  2. Directory Browsing/Listing
    By Hardy in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 10-16-2007, 08:43 PM
  3. Directory browsing
    By logikstudios in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 04-15-2007, 04:28 PM
  4. Main Shared IP - Directory Browsing
    By bonnmac in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 07-31-2004, 06:01 PM
  5. [proftp] On browsing directory, disconnect
    By F Brown in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 01-01-2004, 10:42 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube