Skip to main content

How to change Home directory in CPanel

Comments

5 comments

  • cPRex Jurassic Moderator
    Hey there! Thanks for joining the forums and talking with us! If the data in the userdata file is correct that's a good thing. I would also recommend manually checking the Apache configuration to see if the wrong data is present there. If so, you can run the following commands to backup and rebuild the Apache configuration using the correct information from the userdata file: cp /etc/apache2/conf/httpd.conf{,.bak-`date +%Y%m%d`} /scripts/rebuildhttpdconf /scripts/restartsrv_httpd
    Can you try that and let me know how it goes?
    0
  • Ravi97
    Thank you for your response. I ran those commands at an escalated root level. For first command i didn't get any noticeable response, second and third commands seamed successfull. but the home directory in cpanel is not yet changed..
    0
  • cPRex Jurassic Moderator
    That's correct - the first command wouldn't have given any output. That's interesting though, as by default cPanel creates everything in the /home/ directory. Was there any special tool used to create this account, or was this done through WHM? Is this issue only happening with one domain on the system?
    0
  • Ravi97
    This issue has been now resolved. Some random youtube video had wrongly guided me to use usermod -d command with a different directory. Being very new to this field i followed it without a second thought. But now it was resolved. Thank you so much for your help Rex. :)
    0
  • cPRex Jurassic Moderator
    Glad to hear you were able to get this fixed!
    0

Please sign in to leave a comment.