In some situations your server’s user data files (/var/cpanel/userdata/ directory comprises for each account) may get corrupted or can be entirely missing.
Steps to rebuild user data files with a valid httpd.conf file:
- The corrupt user data directory must be moved to a new location.
You can do this by using the mv command to move the directory and its contents to a new location.
mv /var/cpanel/userdata /var/cpanel/userdata.orig
- A new user data directory must be created.
To create a new user data directory use the mkdir command.
mkdir /var/cpanel/userdata
- To rebuild user data files run userdata_updatethe script.
The /usr/local/cpanel/bin/userdata_update script restores userdata files for all of the accounts that are present on your server.
/usr/local/cpanel/bin/userdata_update –reset
- To validate the user data permissions settings run the script fix_userdata_perms.
The /usr/local/cpanel/bin/fix_userdata_perms script makes certain that all of your server’s userdata files and directories are assigned the correct permissions settings.
/usr/local/cpanel/bin/fix_userdata_perms
- To update the system’s cache run script updateuserdatacache.
The /scripts/updateuserdatacache script makes sure that the system appropriately caches all user data files.
/scripts/updateuserdatacache
- Restore Apache
To use the rebuilt user data files, you must rebuild Apache.
/scripts/rebuildhttpdconf
- Apache Restart is required
Restart Apache on your server after you rebuild it.
/scripts/restartsrv_httpd
This way you can rebuild user data files from a valid httpd.conf file.