Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    2

    Default How do you password protect the root directory?

    How can I password protect the root directory with Web Protect? From the Access Menu I click the Current Folder (either the icon or the \"/\" hyperlink) and the page just keeps returning to itself?

    I can password protect any sub directory, but not the root directory.

    Thanks.

  2. #2
    Member pfmartin's Avatar
    Join Date
    Aug 2001
    Location
    Earth
    Posts
    166

    Default

    I think you cannot do this through the control panel. You\'ll need to do it by creating an .htaccess file by hand. Quick way: Protect a dubdirectory. Then login and copy the .htaccess file from the protected directory to the main webroot. That should do it.

  3. #3
    Registered User
    Join Date
    Sep 2001
    Posts
    2

    Default

    That worked. Thanks.

  4. #4
    Member
    Join Date
    Mar 2002
    Posts
    448

    Default

    This is silly. You should be able to password protect the root web folder via Cpanel and not have to apply this (albeit simple) workaround. Posting this as a bug...
    • Web Design Perth .:. Itomic Business Website Solutions of Perth, Western Australia

  5. #5
    Registered User
    Join Date
    Sep 2003
    Posts
    4

    Default

    This is the .htaccess I created in my dubditectory:

    AuthType Basic

    AuthName "Test"

    AuthUserFile /home/test/.htpasswds/images/passwd


    require valid-user

    Here's my index's:

    # -FrontPage-

    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

    <Limit GET POST>
    order deny,allow
    deny from all
    allow from all
    </Limit>
    <Limit PUT DELETE>
    order deny,allow
    deny from all
    </Limit>
    AuthName www.test.com
    AuthUserFile /home/test/public_html/_vti_pvt/service.pwd
    AuthGroupFile /home/test/public_html/_vti_pvt/service.grp

    How do I merge the two?

  6. #6
    Member
    Join Date
    Apr 2003
    Posts
    40

    Default

    If you're using FrontPage, it needs to do things its own way. You should be able to protect the directory using FrontPage.

    From FrontPage->Tools->Server->Permissions

    It will open a new web browser and give you the FrontPage Admin tools where you can add users.

  7. #7
    Member
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    675

    Default

    Umm why are you trying to password protect the root folder with .htaccess haha! This shouldn't be readable by anyone other than the root user himself, simple as that.
    Upload Guardian 2.0 - Sign up for our early beta
    ServerProgress - Server security, consulting and assistance

  8. #8
    Member
    Join Date
    Apr 2003
    Posts
    40

    Default

    I believe he is referring to the root directory of his web, not the root of the server.

  9. #9
    Member
    Join Date
    Aug 2001
    Posts
    421
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Originally posted by vicos
    I believe he is referring to the root directory of his web, not the root of the server.
    The root directory of the web is not accessible via http, so it shouldn't need protecting. Only files placed in the public_html folder are accessible via a web browser.

  10. #10
    Member
    Join Date
    Feb 2004
    Posts
    469

    Default

    Perhaps we should try and sort out our roots so we don't get this confusion. It could then become a rooting standard.

    There is nothing worse than a non standard confusing root

    How does this look?

    Server root = /
    User root = /home/user/
    Web root = /home/user/public_html/


    Your input with any more roots could only help.

Similar Threads & Tags
Similar threads

  1. Password Protect Directory option missing?
    By jaydh39 in forum New User Questions
    Replies: 1
    Last Post: 07-25-2008, 11:00 AM
  2. Replies: 8
    Last Post: 06-21-2008, 07:23 PM
  3. password protect directory failure
    By bdub01 in forum New User Questions
    Replies: 1
    Last Post: 04-15-2008, 02:41 PM
  4. password protect directory (maximum users)
    By mlarsen in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 11-23-2004, 12:28 PM
  5. password protect and index protect users root www directory
    By cyberspirit in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 09-04-2003, 01:16 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube