Question

FTP Apache permissions

very basic question:

I have apache set up on a ubuntu droplet. created a newuser, gave him root access. when I log in as newuser through ssh/sftp I need to be able to upload files to /var/www but I dont have permission. How would I give newuser permission to upload and delete from that folder so I can actually put web pages up?


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.

How did you give him root access ? <br> <br>Anyway, a better option can be changing ownership of the files in /var/www to the yourself : apache and adding the user to the apache group. Then permissions of 775 on the folder will give user the proper read write permissions.

You can do that, it shouldn’t cause any issues.

would you add the admin account to the www-data group? or is that not necessary/recommended? <br> <br>and yes, i do use sftp