Report this

What is the reason for this report?

when I create my nano file and hit ^X then Yes to save file with html samples it says error

Posted on March 31, 2021

when I create my nano file and hit ^X then Yes to save file with html samples it says error

nano /var/www/nwainternetmarketingservices.com/index.html

<html> <head> <title>Welcome to nwainternetmarketingservices.com!</title> </head> <body> <h1>Success! The nwainternetmarketingservices.com virtual host is working!</h1> </body> </html>

then I hit Ctrl X the Yes to save it as: /var/www/nwainternetmarketingservices.com/index.html [ Error writing /var/www/nwainternetmarketingservices.com/index.html: No such file or directory ]



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
  • go to www directory by executing the following command cd /var/www
  • check the owner and group of the directory nwainternetmarketingservices.com by executing the command ls -ld nwainternetmarketingservices.com
  • If it indicates that you do not own the directory, execute the command sudo chown -R $USER:USER nwainternetmarketingservices.com
  • Now after that, try creating the file again by executing
cd /var/www/nwainternetmarketingservices.com
nano index.html

If everything is fine, then the file should be able to be created

Hi @beauboswell,

The command states you are trying to type in a directory that doesn’t exist.

  1. Make sure it does exist like this:
ls -lah /var/www/
  1. If you see a directory called nwainternetmarketingservices.com from the output good, that means there is a directory. Having said that, I’m almost certain there won’t be a directory called that way there. To fix this type in
mkdir /var/www/nwainternetmarketingservices.com
  1. Once it completes, you can go ahead and do
nano /var/www/nwainternetmarketingservices.com/index.html

And paste over what you need inside.

Regards, KFSys

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.