InMotion Hosting Support Center

no-such-file-or-directoryWhen setting up an email account in the cPanel email accounts, you may encounter the following error.

File open for /home/userna5/etc/ failed with error No such file or directory

This error occurs when the etc folder was deleted or renamed inside your home directory of your files.

How to fix the No such file or directory error

  1. First, contact tech support to see if you can have your files restored from a backup.

    If support does not have the files in the backups, proceed to step 2.

  2. Login into your cPanel.
  3. Go to the File Manager. Select the Home directory and click Go.
  4. Check for the following Necessary files for your server to function. The following are the files you need for your server.

    - public_html
    - public_ftp
    - mail
    - etc

    If any of these are missing, you can just recreate them in the file manager. Once you have the etc and/or the mail folder created, your will be able to create email addresses again.

Was this article helpful?

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Forum Login

You are NOT logged in. You can still browse our Support Center.

To participate within our Community Support Forum:

n/a Points
2017-11-10 5:43 am

You are amazing people. You will be get success because you are doing work like a legend. love you so much you saved my dollars. 

n/a Points
2017-10-05 11:16 pm

Thanks!!!! Work!!! :)

n/a Points
2016-11-26 10:21 pm

thanks, its working now

n/a Points
2016-11-17 7:03 am

working fine , thanks :)

n/a Points
2016-07-07 6:23 pm

Thanks, that really helped, I was only creating the etc folder and could not create emails. Once I created the mail folder it worked like a charm.

n/a Points
2016-05-12 5:56 pm

Thank you so much! you saved my life! only took a couple of minutes and it totally fixed the errors


n/a Points
2016-04-25 7:13 pm

Thanks! I have had so many issues with this. After spending three hours on it, it turns out it is a two minute fix :)

n/a Points
2015-12-21 3:42 pm

great help, fixed it in 2 min


n/a Points
2015-09-01 4:48 pm

Thanks now that was awesome help 10/10

n/a Points
2015-04-25 1:51 am

Thanks so much! This worked perfectly!

n/a Points
2015-02-08 5:00 pm

Thanks a lot, this post was very successful

n/a Points
2014-11-06 11:38 am

You guys are my new best friends!

you are right, I was missing the files, because I ditched a theme that was ticking me off. That will teach me to stay calm. I put the files back in home folder, however Im not sure if I put them in the correct place.

Thank you for this assitance. Your help is amazing I would have never found the problem by myself  whew!

I'm faving this site.

n/a Points
2014-07-09 5:22 pm

thanks. that was helpful

n/a Points
2014-07-08 10:34 am

Thank you it works!!

11,186 Points
2013-11-13 8:53 am
If you made any modifications to the mail directory or had previously removed the email account in question, it will cause any email messages to be removed. I recommend requesting a restore from backups as one may be available for you.
2013-11-13 7:04 am
thanks. i recreate the etc folder, and recreate my email account but all my previous message in the inbox are empty why?
2013-08-19 12:55 pm
hey, Muchas gracias por tu ayuda, me ayudo completamente.

Post a Comment

Email Address:
Phone Number:

Please note: Your name and comment will be displayed, but we will not show your email address.

19 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!