{"id":2062,"date":"2021-12-11T08:59:52","date_gmt":"2021-12-11T08:59:52","guid":{"rendered":"https:\/\/ownwebservers.com\/kb\/?p=2062"},"modified":"2021-12-11T13:08:10","modified_gmt":"2021-12-11T13:08:10","slug":"how-to-rebuild-user-data-files-from-a-valid-httpd-conf-file","status":"publish","type":"post","link":"https:\/\/ownwebservers.com\/kb\/how-to-rebuild-user-data-files-from-a-valid-httpd-conf-file\/","title":{"rendered":"How to rebuild user data files from a valid httpd.conf file"},"content":{"rendered":"<p>In some situation your server\u2019s userdata files (\/var\/cpanel\/userdata\/ directory comprises for each account) may get corrupted or can be entirely missing.<\/p>\n<h2>Below are the Steps that explain to rebuild userdata files with a valid httpd.conf file<\/h2>\n<h2>1. The userdata directory that has been corrupted must be moved to a new location.<\/h2>\n<p>You can do this by using the mv command to move the directory and its contents to a new location.<br \/>\n<strong>mv\u00a0\/var\/cpanel\/userdata\u00a0\/var\/cpanel\/userdata.orig<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2064\" src=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/rebuild-1-300x26.png\" alt=\"rebuild-1\" width=\"600\" height=\"51\" srcset=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/rebuild-1-300x26.png 300w, https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/rebuild-1.png 600w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<h2>2. A new userdata directory must be created.<\/h2>\n<p>To create new user data directory use mkdir command<br \/>\n<strong>mkdir\u00a0\/var\/cpanel\/userdata<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2065\" src=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/rebuild-2-300x26.png\" alt=\"rebuild-2\" width=\"600\" height=\"51\" srcset=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/rebuild-2-300x26.png 300w, https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/rebuild-2.png 600w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<h2>3. To rebuild userdata files run userdata_update script<\/h2>\n<p>The \/usr\/local\/cpanel\/bin\/userdata_update script restores userdata files for all of the accounts that are present on your server.<br \/>\n<strong>\/usr\/local\/cpanel\/bin\/userdata_update \u2013reset<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2066\" src=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/rebuild-3-300x26.png\" alt=\"rebuild-3\" width=\"600\" height=\"51\" srcset=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/rebuild-3-300x26.png 300w, https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/rebuild-3.png 600w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<h2>4. To validate the userdata permissions settings run the script fix_userdata_perms<\/h2>\n<p>The \/usr\/local\/cpanel\/bin\/fix_userdata_perms script makes certain that all of your server\u2019s userdata files and directories are assigned the correct permissions settings.<br \/>\n<strong>\/usr\/local\/cpanel\/bin\/fix_userdata_perms<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2067\" src=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/rebuild-4-300x26.png\" alt=\"rebuild-4\" width=\"600\" height=\"51\" srcset=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/rebuild-4-300x26.png 300w, https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/rebuild-4.png 600w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<h2>5. To update the system\u2019s cache run script updateuserdatacache.<\/h2>\n<p>The \/scripts\/updateuserdatacache script makes sure that the system appropriately caches all userdata files.<br \/>\n<strong>\/scripts\/updateuserdatacache<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2068\" src=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/rebuild-5-300x25.png\" alt=\"rebuild-5\" width=\"601\" height=\"51\" srcset=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/rebuild-5-300x25.png 300w, https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/rebuild-5.png 601w\" sizes=\"auto, (max-width: 601px) 100vw, 601px\" \/><\/p>\n<h2>6. Restore Apache.<\/h2>\n<p>To use the rebuilt userdata files, you must rebuild Apache.<br \/>\n<strong>\/scripts\/rebuildhttpdconf<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2069\" src=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/rebuild-6-300x25.png\" alt=\"rebuild-6\" width=\"601\" height=\"51\" srcset=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/rebuild-6-300x25.png 300w, https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/rebuild-6.png 601w\" sizes=\"auto, (max-width: 601px) 100vw, 601px\" \/><\/p>\n<h2>7. Apache Restart is required<\/h2>\n<p>Restart Apache on your server\u00a0after you rebuild it.<br \/>\n<strong>\/scripts\/restartsrv_httpd<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2070\" src=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/rebuild-7-300x25.png\" alt=\"rebuild-7\" width=\"601\" height=\"51\" srcset=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/rebuild-7-300x25.png 300w, https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/rebuild-7.png 601w\" sizes=\"auto, (max-width: 601px) 100vw, 601px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In some situation your server\u2019s userdata files (\/var\/cpanel\/userdata\/ directory comprises for each account) may get corrupted or can be entirely missing. Below are the Steps that explain to rebuild userdata files with a valid httpd.conf file 1. The userdata directory that has been corrupted must be moved to a new location. You can do this [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[],"class_list":["post-2062","post","type-post","status-publish","format-standard","hentry","category-tech-support"],"_links":{"self":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/2062","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/comments?post=2062"}],"version-history":[{"count":5,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/2062\/revisions"}],"predecessor-version":[{"id":2106,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/2062\/revisions\/2106"}],"wp:attachment":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/media?parent=2062"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/categories?post=2062"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/tags?post=2062"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}