{"id":690,"date":"2012-07-11T05:12:20","date_gmt":"2012-07-11T11:12:20","guid":{"rendered":"http:\/\/blog.supportpro.com\/?p=690"},"modified":"2026-03-26T04:12:28","modified_gmt":"2026-03-26T10:12:28","slug":"email-creation-error-in-cpanel","status":"publish","type":"post","link":"https:\/\/www.supportpro.com\/blog\/email-creation-error-in-cpanel\/","title":{"rendered":"How to Fix \u201cNo such file or directory: \/home\/user1\/etc\/domain.com\/passwd\u201d in cPanel"},"content":{"rendered":"\n<p>While creating an email account in cPanel, you may encounter the error:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>No such file or directory: \/home\/user1\/etc\/domain.com\/passwd<\/code><\/pre>\n\n\n\n<p>This error typically means the system cannot find the required directory structure to generate mailbox configuration files.<\/p>\n\n\n\n<p>In most cases, the issue occurs because the <code>etc<\/code> directory inside the user\u2019s home folder is missing or was accidentally deleted.<\/p>\n\n\n\n<p>Let\u2019s understand why this happens and how to fix it safely.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why This Error Occurs<\/h2>\n\n\n\n<p>When an email account is created in cPanel, the system automatically generates configuration files inside:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/home\/username\/etc\/domain.com\/<\/code><\/pre>\n\n\n\n<p>Inside this directory, cPanel creates the <code>passwd<\/code> file, which stores mailbox configuration details.<\/p>\n\n\n\n<p>If the <code>\/etc<\/code> directory does not exist inside the user\u2019s home path, the mail system cannot create the required file. As a result, you see the \u201cNo such file or directory\u201d error.<\/p>\n\n\n\n<p>This is a directory structure issue \u2014 not a mail server failure.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Step-by-Step Fix<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Connect to the Server via SSH<\/h2>\n\n\n\n<p>Log in as root or a privileged user.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Create the Missing Directory<\/h2>\n\n\n\n<p>Run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir \/home\/user1\/etc<\/code><\/pre>\n\n\n\n<p>Replace <code>user1<\/code> with the actual cPanel username.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Set Correct Permissions<\/h2>\n\n\n\n<p>Assign proper permissions:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chmod 0750 \/home\/user1\/etc<\/code><\/pre>\n\n\n\n<p>This ensures:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The owner has full access<\/li>\n\n\n\n<li>The group has limited access<\/li>\n\n\n\n<li>Others have no access<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4: Set Correct Ownership<\/h2>\n\n\n\n<p>The directory must have the correct owner and group so the mail service can write to it.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chown user1:mail \/home\/user1\/etc<\/code><\/pre>\n\n\n\n<p>Where:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Owner:<\/strong> user1 (cPanel username)<\/li>\n\n\n\n<li><strong>Group:<\/strong> mail<\/li>\n<\/ul>\n\n\n\n<p>Incorrect ownership is a common reason why the issue persists even after creating the folder.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5: Retry Email Creation<\/h2>\n\n\n\n<p>Go back to cPanel and try creating the email account again.<\/p>\n\n\n\n<p>If permissions and ownership are correct, the system will automatically generate:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/home\/user1\/etc\/domain.com\/passwd<\/code><\/pre>\n\n\n\n<p>The error should now be resolved.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Additional Troubleshooting Checks<\/h1>\n\n\n\n<p>If the issue continues:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Verify Domain Folder Exists<\/h3>\n\n\n\n<p>Check whether:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/home\/user1\/etc\/domain.com\/<\/code><\/pre>\n\n\n\n<p>exists after creating the email.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Check Mail Service Status<\/h3>\n\n\n\n<p>On most cPanel servers running Exim:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl status exim<\/code><\/pre>\n\n\n\n<p>Make sure the mail service is active.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Run cPanel Maintenance Scripts (If Needed)<\/h3>\n\n\n\n<p>On servers running WHM:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/scripts\/updateuserdomains<br>\/scripts\/mailperm<\/code><\/pre>\n\n\n\n<p>These scripts repair domain and mail permissions.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Why This Folder Goes Missing<\/h1>\n\n\n\n<p>Common reasons include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Manual deletion inside <code>\/home\/username\/<\/code><\/li>\n\n\n\n<li>Incorrect restore from backup<\/li>\n\n\n\n<li>Migration errors<\/li>\n\n\n\n<li>Permission misconfiguration<\/li>\n\n\n\n<li>Incomplete account transfer<\/li>\n<\/ul>\n\n\n\n<h1 class=\"wp-block-heading\">Prevention Tips<\/h1>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Avoid manually deleting system folders inside <code>\/home\/username\/<\/code><\/li>\n\n\n\n<li>Perform regular backups<\/li>\n\n\n\n<li>Audit directory permissions after migrations<\/li>\n\n\n\n<li>Use official account transfer tools in WHM<\/li>\n<\/ul>\n\n\n\n<h1 class=\"wp-block-heading\">FAQ<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">Is this a mail server failure?<\/h2>\n\n\n\n<p>No. The error occurs because a required directory inside the user\u2019s home path is missing.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Can this happen after account migration?<\/h2>\n\n\n\n<p>Yes. Improper account migration or partial restore can remove critical directories.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What permissions should the etc folder have?<\/h2>\n\n\n\n<p>Recommended:<\/p>\n\n\n\n<p>Group: mail<\/p>\n\n\n\n<p>Permission: 0750<\/p>\n\n\n\n<p>Owner: cPanel username<\/p>\n\n\n\n<p>If you require help, <a href=\"https:\/\/www.supportpro.com\/requestquote.php\">contact SupportPRO Server Admin<\/a><\/p>\n\n\n\n<p class=\"has-text-align-center\"><span id=\"hs-cta-wrapper-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-wrapper\"><span id=\"hs-cta-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-node hs-cta-9d590242-d641-4383-94b4-8cfd62f0af6b\"><a href=\"https:\/\/cta-redirect.hubspot.com\/cta\/redirect\/2725694\/9d590242-d641-4383-94b4-8cfd62f0af6b\"><\/a><\/span><\/span><\/p>\n\n\n\n<div class=\"wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile is-vertically-aligned-center has-white-background-color has-background\"><div class=\"wp-block-media-text__content\">\n<p class=\"has-large-font-size\">Partner with <strong>SupportPRO<\/strong> for 24\/7 proactive cloud support that keeps your business secure, scalable, and ahead of the curve.<\/p>\n\n\n\n<!--HubSpot Call-to-Action Code --><span class=\"hs-cta-wrapper\" id=\"hs-cta-wrapper-3350a795-db50-482f-9911-301930d1b1be\"><span class=\"hs-cta-node hs-cta-3350a795-db50-482f-9911-301930d1b1be\" id=\"hs-cta-3350a795-db50-482f-9911-301930d1b1be\"><!--[if lte IE 8]><div id=\"hs-cta-ie-element\"><\/div><![endif]--><a href=\"https:\/\/cta-redirect.hubspot.com\/cta\/redirect\/2725694\/3350a795-db50-482f-9911-301930d1b1be\" ><img decoding=\"async\" class=\"hs-cta-img\" id=\"hs-cta-img-3350a795-db50-482f-9911-301930d1b1be\" style=\"border-width:0px;\" src=\"https:\/\/no-cache.hubspot.com\/cta\/default\/2725694\/3350a795-db50-482f-9911-301930d1b1be.png\"  alt=\"Contact Us today!\"\/><\/a><\/span><script charset=\"utf-8\" src=\"https:\/\/js.hscta.net\/cta\/current.js\"><\/script><script type=\"text\/javascript\"> hbspt.cta.load(2725694, '3350a795-db50-482f-9911-301930d1b1be', {\"useNewLoader\":\"true\",\"region\":\"na1\"}); <\/script><\/span><!-- end HubSpot Call-to-Action Code -->\n<\/div><figure class=\"wp-block-media-text__media\"><img fetchpriority=\"high\" decoding=\"async\" width=\"904\" height=\"931\" src=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup.png\" alt=\"guy server checkup\" class=\"wp-image-12943 size-full\" srcset=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup.png 904w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-291x300.png 291w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-768x791.png 768w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-585x602.png 585w\" sizes=\"(max-width: 904px) 100vw, 904px\" \/><\/figure><\/div>\n","protected":false},"excerpt":{"rendered":"<p>While creating an email account in cPanel, you may encounter the error: This error typically means the system cannot find the required directory structure to generate mailbox configuration files. In&hellip;<\/p>\n","protected":false},"author":4,"featured_media":15600,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-690","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-miscellaneous"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/690","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/comments?post=690"}],"version-history":[{"count":6,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/690\/revisions"}],"predecessor-version":[{"id":16647,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/690\/revisions\/16647"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/media\/15600"}],"wp:attachment":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/media?parent=690"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/categories?post=690"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/tags?post=690"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}