The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How do you password protect the root directory?

Discussion in 'General Discussion' started by kencl, Sep 10, 2001.

  1. kencl

    kencl Registered

    Joined:
    Sep 10, 2001
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    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. pfmartin

    pfmartin Well-Known Member

    Joined:
    Aug 18, 2001
    Messages:
    167
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Earth
    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. kencl

    kencl Registered

    Joined:
    Sep 10, 2001
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    That worked. Thanks.
     
  4. spaceman

    spaceman Well-Known Member

    Joined:
    Mar 25, 2002
    Messages:
    481
    Likes Received:
    0
    Trophy Points:
    16
    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...
     
  5. Olternit

    Olternit Registered

    Joined:
    Sep 24, 2003
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    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. vicos

    vicos Well-Known Member

    Joined:
    Apr 18, 2003
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    6
    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. ramprage

    ramprage Well-Known Member

    Joined:
    Jul 21, 2002
    Messages:
    667
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Canada
    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.
     
  8. vicos

    vicos Well-Known Member

    Joined:
    Apr 18, 2003
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    6
    I believe he is referring to the root directory of his web, not the root of the server.
     
  9. Curious Too

    Curious Too Well-Known Member

    Joined:
    Aug 31, 2001
    Messages:
    427
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    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. Izzee

    Izzee Well-Known Member

    Joined:
    Feb 6, 2004
    Messages:
    469
    Likes Received:
    0
    Trophy Points:
    16
    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 :D

    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.
     
Loading...

Share This Page