Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    May 2006
    Location
    Idaho Falls, Idaho, USA
    Posts
    2

    Default Password protect web page folder

    I would like to password protect a folder for some internet web pages. I used the Password Protect Directories item in cPanel, and it created the following .htaccess file:

    AuthType Basic

    AuthName "Protected Login"

    AuthUserFile "/home/mydomain/.htpasswds/protect/passwd"


    require valid-user

    However, there is no "passwd" file in the folder "protect", so when I try to access the page:
    http://www.mydomain.com/protect/index.htm
    I enter my user name and password, but it is rejected. What am I missing? What else do I need to do to get this working? Any ideas would be appreciated. Thanks.

  2. #2
    Member
    Join Date
    Jan 2005
    Posts
    1,880

    Default

    /home/user/.htpasswds/protect/passwd will exist but will not be viewable via FTP for normal users and under normal conditions. Trust me - I've checked a few times in the past!

    You could try simply removing all users from the relevant protected directory, unprotect the directory, re-protect the directory and re-add the relevant users.

    Alternatively, you could examine /home/user/.htpasswds/protect/passwd via shell and check that the contents are correct.

    I'm assuming that after protecting the relevant directory you did then add the details of who can access the directory?

  3. #3
    Registered User
    Join Date
    May 2006
    Location
    Idaho Falls, Idaho, USA
    Posts
    2

    Default

    I tried setting it up again, and it is now working. Thanks for the suggestions.

Similar Threads & Tags
Similar threads

  1. Password-Protect Web Root - Not Possible?
    By JinGu in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 04-23-2008, 08:47 AM
  2. Replies: 3
    Last Post: 04-17-2008, 04:00 PM
  3. Password protect a folder inside of root
    By einternet in forum Security
    Replies: 1
    Last Post: 03-17-2008, 09:55 AM
  4. Can't Password Protect a Folder
    By trading-assist in forum New User Questions
    Replies: 3
    Last Post: 10-25-2004, 12:37 PM
  5. Cannot Password Protect Folder
    By furquan in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 08-04-2004, 09:48 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube