"error writing /usr/share/nginx/www/info.php: No such file or directory" when trying to save and exit

Hi all,

New to this stuff and being really overwhelmed. I’m at step 7 in this tutorial and getting the error above.

I just created the file in the previous step so why is it giving me this error?


Show comments

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

This question was answered by @ryanpq:

Are you doing this on Ubuntu 12.04 or on 14.04. That tutorial includes this note:

UPDATE: Newer Ubuntu versions create a directory called 'html' instead of 'www' by default. If /usr/share/nginx/www does not exist, it's probably called html. Make sure you update your configuration appropriately.

This would likely explain the error you are encountering if the www directory does not exist. You will need to ensure you update that path you are using to html instead.

View the original comment