How to rebuild corrupted userdata files in cPanel/WHM
mv /var/cpanel/userdata /var/cpanel/userdata-original
3. Re-create the userdata directory with this command:
mkdir /var/cpanel/userdata
3. Run the cPanel utility that will generate the new userdata files. The command is:
/usr/local/cpanel/bin/userdata_update --reset
The –reset flag will regenerate the files from the httpd.conf file. This is the main command of the process. You can find out more about it by:
/usr/local/cpanel/bin/userdata_update --help
root@web [~]# /usr/local/cpanel/bin/userdata_update --help
Usage: userdata_update [--reset] [--unpark_addons] [--help | --usage]
Options:
--------------------------------
--reset
IMPORTANT! Do not conserve existing userdata and regenerate new userdata files
based upon the current Apache configuration file. This should be used as a last resort.
--unpark-addons
Fix instances where an addon domain is also listed as a parked domain. This flag will
result in a reset of all userdata files. See "--reset" warnings for more information.
--help
Display usage information
root@web [~]#
4. Run the cPanel utility to verify that all the directories and files have the correct permissions set:
/usr/local/cpanel/bin/fix_userdata_perms
5. Run this cPanel script to update the system cache, as the new files and directories have just been generated
/scripts/updateuserdatacache
6. Apache must be rebuilt. Use the command:
/scripts/rebuildhttpdconf
7. Now Apache webserver must be restarted. This is the last step of the tutorial.
/scripts/restartsrv_httpd
cPanel userdata files for an account
No comments:
Post a Comment