Password protected directory loosing the protection

kenrbnsn

Active Member
Feb 27, 2002
36
1
308
Hillsborough, NJ, USA
I password protected a site by putting a password on the public_html directory. Now three weeks later, the client sent me an email saying it was open. I checked and there was no longer a check mark indicating the directory was password protected. I didn't unprotect it.

cPanel Version 11.38.2 (build 2)
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello :)

The "Password Protect Directories" feature in cPanel utilizes the .htaccess file within the account. You should see an entry such as the following in the "/home/user/public_html/.htaccess" file:

Code:
AuthType Basic
AuthName "test"
AuthUserFile "/home/user/.htpasswds/public_html/passwd"
require valid-user
If the entry is missing, it typically indicates the user installed a script that overwrote the .htaccess file, or the file was manually modified.

Thank you.