Cannot remove password protection in cpanel

kaspir

Member
Jan 20, 2016
5
0
1
PA
cPanel Access Level
Website Owner
Hi all,

I am an administrator for a website that was hacked. Following a tutorial from my hosting provider I password protected the home/user/ directory in order to avoid visitors being infected. I used cpanel to do this, selecting the directory and then checking the password protect box and setting up a username and password. When I visit the site I get a 500 error though. I read in some other forums that cpanel automatically creates htaccess and htpasswd files and that the former can't access the later because it doesn't have permission yet (a paradox if you will). I tried to go back into cpanel and remove it , but the box for that directory is not actually ticked anymore, so how do I remove password protection manually by editing the htaccess files on the server?

Thanks in advance.
 

kaspir

Member
Jan 20, 2016
5
0
1
PA
cPanel Access Level
Website Owner
Renaming the .htaccess file to .htaccess.txt will effectively kill it.
I did what you suggested and it worked...in a sense. If I rename it to .htaccess.txt I get a 500 error but it doesn't look the same as before like chrome is generating it:

Capture.with.text.PNG

And without .txt on the end is generates a 500 server error from Apache:

Capture.without.text.PNG

In firefox the screen displays nothing when there is .txt added to the file, but same apache error when .txt is absent.
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,225
463
What's output to the "Error Log" option in cPanel when you notice the "500" error code in your browser?

Thank you.
 

kaspir

Member
Jan 20, 2016
5
0
1
PA
cPanel Access Level
Website Owner
What's output to the "Error Log" option in cPanel when you notice the "500" error code in your browser?

Thank you.
This is the output.

Code:
[Wed Jan 20 14:21:06 2016] [error] [client 1.2.3.4] (13)Permission denied: Could not open password file: /home/user/public_html/_vti_pvt/service.pwd
 

kaspir

Member
Jan 20, 2016
5
0
1
PA
cPanel Access Level
Website Owner
There's actually more but I keep getting an error that says the content is spam like...

Capture.PNG
 
Last edited by a moderator:

Infopro

Well-Known Member
May 20, 2003
17,107
515
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter