Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Point my cPanel to another directory

Discussion in 'General Discussion' started by bromero, May 9, 2013.

  1. bromero

    bromero Registered

    May 9, 2013
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Website Owner
    By (a horrible) mistake, I deleted via ssh the account user that managed my only account/domain. I quickly re-created a new user with the same name, password and home. However, when I log in cPanel I land in an empty account. How can I fix this mess? The original directory is intact and I need to be able to access it again via cpanel.

  2. cPanelJared

    cPanelJared Technical Analyst

    Feb 25, 2010
    Likes Received:
    Trophy Points:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    You can try using the usermod command to change the home directory of the user back to the original home directory.

    Linux usermod command - Edit or modify Linux user account information | Linux basic configurations

    The problem that you are going to have is that the UID of the old user is probably different from the UID of the new user you created, and you are going to need to change the ownerships of all the files in the home directory because, right now, they are probably owned by a UID that is no longer associated with a user (since you deleted the old user).

    Do you have a good backup of the account? If you do, terminating the account and restoring it from a good backup that was made before you made this mistake is really the best way to approach this.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice