Report this

What is the reason for this report?

Create FTP user for /var/www

Posted on April 10, 2014

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!



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.

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/

@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.

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.