Question

Create FTP user for /var/www

Hello, i have a WordPress droplet, with 2 users. One is root, and another one i created.

This second one is sudoer too, but if i log in with FileZilla, i can’t go back in folders tree and navigate to /var/www

How can i enable this user to properly navigate only in /var/www and manage files?

Thanks!


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.

@Bryan Thanks, but that tutorial says to create a new user and chroot the folder for it, but i want the folder owner to be www-data as it is now. <br> <br>@Daniyaal is it only for FTP, right? I’d like to use SFTP instead.

You’ll want to jail the user with a <a href=“http://en.wikipedia.org/wiki/Chroot”>chroot</a>. Here’s a good tutorial I found while Googling that should get exactly what you want done. Just change the directory and user to the appropriate ones you need. <br> <br>http://www.thegeekstuff.com/2012/03/chroot-sftp-setup/