The user data files on your server could occasionally become faulty, which could cause problems if you are moving or using your cPanel account. Fortunately, if the server’s httpd.conf file is legitimate and operational, it is possible to repair these user data files.
Let us proceed as follows:
- First, use your username and password to log in as the root user to your WHM/cPanel server.
- Finding the user data files is the next step; they are located at /var/cpanel. Verify that the server has the user data directory.
- Use the mv command to transfer or rename the directory if it already exists. It ought to appear like this:
mv /var/cpanel/userdata /var/cpanel/userdata_backup
- Next, use the command mkdir to create a new userdata directory:
mkdir /var/cpanel/userdata
- Now that we have a new userdata directory built, execute the userdata_update script with the –reset flag to rebuild the userdata files for every account hosted on your cPanel server. By doing this, all of the accounts hosted on your cPanel server will have their userdata files rebuilt.
/usr/local/cpanel/bin/userdata_update –reset
- The next step is to correct the permissions for the freshly created user data files. To accomplish this, execute the following command:
/usr/local/cpanel/bin/fix_userdata_perms
- You must update the system cache since you created a new userdata file. The command can be used to accomplish this:
/scripts/updateuserdatacache
- Use the following command to rebuild the Apache configuration so that the freshly rebuilt userdata files may be used:
/scripts/rebuildhttpdconf
- Finally, restart the Apache service with the command:
/scripts/restartsrv_httpd
That is it! Hope you liked our article. You can now use cPanel to rebuild corrupted user data files.
Learn how to recover crucial data by How to Rebuild user Data Files from a Valid httpd.conf File