Results 1 to 9 of 9

Thread: username/password not working after password protect directory via cpanel

  1. #1
    Member
    Join Date
    May 2008
    Posts
    6

    Default username/password not working after password protect directory via cpanel

    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. #2
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    10,080
    cPanel/WHM Access Level

    Root Administrator

    Lightbulb

    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. #3
    Member
    Join Date
    May 2008
    Posts
    6

    Default

    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. #4
    Member
    Join Date
    Jul 2003
    Posts
    64

    Default

    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. #5
    Member
    Join Date
    Jul 2006
    Posts
    291

    Default

    Its looking for your password file to be located here:

    /home/userid/.htpasswds/public_html/passwd

    Is it?

  6. #6
    Member
    Join Date
    Jul 2003
    Posts
    64

    Default

    Quote Originally Posted by ChrisRHS View Post
    Its looking for your password file to be located here:

    /home/userid/.htpasswds/public_html/passwd

    Is it?
    It is.

    I've raised a bug report - http://bugzilla.cpanel.net/show_bug.cgi?id=6965

  7. #7
    cPanel Staff cpanelnick's Avatar
    Join Date
    Feb 2003
    Location
    Houston, TX
    Posts
    4,771

    Default

    Looks like a local permissions issue. You should probably open a ticket.
    -Nick
    cPanel Inc.

    Need support? Submit a request here. Complimentary support is available to all license holders regardless of where you purchased your license.
    Need a complimentary support account? Create one here.

  8. #8
    Member
    Join Date
    Jul 2003
    Posts
    64

    Default

    What's the passwd file permission supposed to be?

  9. #9
    cPanel Staff cPanelDavidL's Avatar
    Join Date
    Nov 2007
    Posts
    17

    Default

    Quote Originally Posted by aegis View Post
    What's the passwd file permission supposed to be?
    The main happening here is the following

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

Similar Threads

  1. cpanel password protect directory not working
    By mehuls77 in forum cPanel & WHM Discussions
    Replies: 1
    Last Post: 06-02-2011, 09:39 PM
  2. password protect directory failure
    By bdub01 in forum New User Questions
    Replies: 1
    Last Post: 04-15-2008, 02:41 PM
  3. password protect directory (maximum users)
    By mlarsen in forum cPanel & WHM Discussions
    Replies: 0
    Last Post: 11-23-2004, 12:28 PM
  4. How do you password protect the root directory?
    By kencl in forum cPanel & WHM Discussions
    Replies: 9
    Last Post: 04-30-2004, 04:31 AM
  5. password protect and index protect users root www directory
    By cyberspirit in forum cPanel & WHM Discussions
    Replies: 1
    Last Post: 09-04-2003, 01:16 PM