Question

How I edit index.html? My droplet is Ubuntu LAMP on 14.04

  • Posted on November 14, 2014
  • juanchoAsked by juancho

I just created a droplet Ubuntu LAMP on 14.04. I am trying to change index.html via filezilla in sftp://miusuario@mydomian.co/var/www/html/index.html Howevere, when I upload my index.hmtl I get the error Error: /var/www/html/index.html: open for write: permission denied. I am following this tutorial: https://www.digitalocean.com/community/tutorials/how-to-use-filezilla-to-transfer-and-manage-files-securely-on-your-vps and everything worked fine until this point. What should I do? I also granted the permissions to “miusuario” suggested in this Tutorial: https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-12-04 so I added the lines in visudo:

miusuario ALL=(ALL:ALL) ALL

Thanks in advance

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.

If you want to be able to edit the file directly using Filezilla over SFTP, you’ll need to add your user to the www-data group and allow all members of that group to edit files. Run:

sudo usermod -a -G www-data foo
sudo chown -R www-data:www-data /var/www/html/
sudo chmod -R g+rw /var/www/html/