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.

Cannot remove password protection in cpanel

Discussion in 'Security' started by kaspir, Jan 20, 2016.

  1. kaspir

    kaspir Member

    Joined:
    Jan 20, 2016
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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.
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,450
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Renaming the .htaccess file to .htaccess.txt will effectively kill it.
     
  3. kaspir

    kaspir Member

    Joined:
    Jan 20, 2016
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    PA
    cPanel Access Level:
    Website Owner
    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.
     
    #3 kaspir, Jan 20, 2016
    Last edited by a moderator: Jan 20, 2016
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  5. kaspir

    kaspir Member

    Joined:
    Jan 20, 2016
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    PA
    cPanel Access Level:
    Website Owner
    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
     
  6. kaspir

    kaspir Member

    Joined:
    Jan 20, 2016
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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
     
    #6 kaspir, Jan 20, 2016
    Last edited by a moderator: Jan 20, 2016
  7. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,450
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    What version of cPanel are you on there?

    Is that directory present on your account?
     
  8. kaspir

    kaspir Member

    Joined:
    Jan 20, 2016
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    PA
    cPanel Access Level:
    Website Owner
    11.48.5 (build 2)

    Yeah, obviously "user" is not really my username, but this is a real directory that I can access using cpanel
     
  9. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,450
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
Loading...

Share This Page