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.

username/password not working after password protect directory via cpanel

Discussion in 'General Discussion' started by syrinx2112, Jun 2, 2008.

  1. syrinx2112

    syrinx2112 Member

    Joined:
    May 28, 2008
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    I am new to cpanel, I switched over from ENSIM...

    I have protected /home/myusername/public_html directory using the Password Protect Directory utility in Cpanel.

    Before I did that, I created a user and password in the Password Protect Utility...

    So what I did was:

    1. Create User Name and Password inside the Password Protect Directory utility in Cpanel.
    2. I then chose the directory I wanted to protect which is the public_html directory. The reason I want to do this is that we are not ready to go live yet, so we basically don't want visitors viewing the site, yet...
    3. After I choose the directory I want to protect which is /public_html in Password Protect Directory utility inside Cpanel - I then SAVE
    4. I then open up another browser (FireFox and IE), and I go to the site (by typing www.mysite.com), I am prompted to enter my user name and password. I put in what I stated in bullet 1 above.

    But it doesn't let me in. What am I doing wrong?

    I have read - and seen the demo to do this and I am confident I am doing everything right.

    Maybe I am not suppose to PW protect the /public_html directory???

    Any ideas from anybody who has experienced this before?

    Thank you in advance...
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,456
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    You could try making sure of no typos, and be sure you ticked the correct directory of course. You absolutely can pass protect public_html.

    If you are not the owner of the server you might try contacting your host for a closer look as to whats wrong.
     
  3. syrinx2112

    syrinx2112 Member

    Joined:
    May 28, 2008
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Hello Infopro,

    I have tried this like 20 times. I made sure I am not committing the infamous typos. So I created a user called 'test' and a password called 'todaytest' and no luck on that.

    Because of the reponse I got from the Cpanel, telling me that permissions have been set for "/public_html", from this, I know I am clicking on the correct directory...

    I am being prompted to put in a user name and password when I go to the site via my browser www.mysite.com and I use 'test' for my username, and 'todaytest' for my password, but it just keeps prompting me for a user and password after I submit what I entered.

    NOTE: I do have another directory called "/public_html/mydir" that I pw protected (created using the Cpanel password protect utility). And when I go to www.mysite.com/mydir I am prompted and that user name and password that I created for the mydir folder works just fine.

    I am not sure what to do from here. All the help is soooo appreciated...
     
  4. aegis

    aegis Well-Known Member

    Joined:
    Jul 6, 2003
    Messages:
    64
    Likes Received:
    0
    Trophy Points:
    6
    I have the same issue and it only seems to affect public_html, not sub folders.

    In the apache error log I get ...

    [Tue Jun 10 18:08:54 2008] [error] [client 82.71.nn.nn] (13)Permission denied: Could not open password file: /home/userid/.htpasswds/public_html/passwd
    [Tue Jun 10 18:08:54 2008] [error] [client 82.71.nn.nn] user test not found: /
    [Tue Jun 10 18:08:54 2008] [error] [client 82.71.nn.nn] (13)Permission denied: Could not open password file: /home/userid/.htpasswds/public_html/passwd
    [Tue Jun 10 18:08:54 2008] [error] [client 82.71.nn.nn] user test not found: /401.shtml

    I'm running under suPHP. Maybe that is the issue?
     
  5. ChrisRHS

    ChrisRHS Well-Known Member

    Joined:
    Jul 12, 2006
    Messages:
    292
    Likes Received:
    5
    Trophy Points:
    18
    Its looking for your password file to be located here:

    /home/userid/.htpasswds/public_html/passwd

    Is it?
     
  6. aegis

    aegis Well-Known Member

    Joined:
    Jul 6, 2003
    Messages:
    64
    Likes Received:
    0
    Trophy Points:
    6
  7. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
    Looks like a local permissions issue. You should probably open a ticket.
     
  8. aegis

    aegis Well-Known Member

    Joined:
    Jul 6, 2003
    Messages:
    64
    Likes Received:
    0
    Trophy Points:
    6
    What's the passwd file permission supposed to be?
     
  9. cPanelDavidL

    cPanelDavidL Member
    Staff Member

    Joined:
    Nov 12, 2007
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    The main happening here is the following

    /home/user/.htpasswds < - this directory must be of ownerships user:nobody
     
Loading...

Share This Page