Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Password protected directory issue

Discussion in 'General Discussion' started by darroosh, Jan 13, 2018.

  1. darroosh

    darroosh Registered

    Joined:
    Jan 13, 2018
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Egypt
    cPanel Access Level:
    Website Owner
    Hi,

    I used Cpanel password protected directories to make some directory password protected.

    Now when I try to go to the firectory URL, it says ( page not found ).
    I opened ( ,htacess) inside this folder and found it containts:

    AuthType Basic
    AuthName "Blablabla"
    AuthUserFile "/home/direcotrry/.htpasswds/public_html/wp-admin/passwd"
    require valid-user


    When I make the lines in the htaccess file as comment ( hash them), the URL works fine again.

    And I went to this path: "/home/direcotrry/.htpasswds/public_html/wp-admin/passwd", to find it's normal containing the username and the encrypted password

    What is wrong?
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,834
    Likes Received:
    85
    Trophy Points:
    78
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Please execute the below command on the server and replicate the blank page scenario and check what error is logged on the server. That will be helpful to troubleshoot and advise properly..

    # tail -f /usr/local/apache/logs/error_logs
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    718
    Likes Received:
    122
    Trophy Points:
    168
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    Try adding this to the end:

    Code:
    ErrorDocument 403 default
    So it will look like:

    Code:
    AuthType Basic
    AuthName "Blablabla"
    AuthUserFile "/home/direcotrry/.htpasswds/public_html/wp-admin/passwd"
    require valid-user
    ErrorDocument 403 default
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. darroosh

    darroosh Registered

    Joined:
    Jan 13, 2018
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Egypt
    cPanel Access Level:
    Website Owner
    I don't have access to server to execute command
    I have added it, But still same result, no change at all.
     
  5. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,309
    Likes Received:
    393
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Have you tried simply removing the password protection from this specific directory and then re-add it?

    What is the directory you're attempting to protect? It is in the public_html directory, correct?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,834
    Likes Received:
    85
    Trophy Points:
    78
    Location:
    India
    cPanel Access Level:
    Root Administrator
    I think you should contact your server provider or the person who has the server access to troubleshoot it..
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice