How to rebuild user data files from a valid httpd.conf file

Steps to rebuild userdata files with a valid httpd.conf file #

1. The corrupt userdata 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

2. A new userdata directory must be created. #

To create new user data directory use mkdir command
mkdir /var/cpanel/userdata

3. To rebuild userdata files run userdata_update 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

4. To validate the userdata 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.

5. To update the system’s cache run script updateuserdatacache.

The /scripts/updateuserdatacache script makes sure that the system appropriately caches all userdata files.

6. Restore Apache. #

To use the rebuilt userdata files, you must rebuild Apache.

7. Apache Restart is required #

Restart Apache on your server after you rebuild it.

Powered by BetterDocs