Create FTP user for /var/www

Posted April 10, 2014 15.6k views
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!

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.

Submit an Answer
3 answers
You'll want to jail the user with a chroot. 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.
You can use PROftpd with mysql back end:
by Matjaž Črnko
This article will guide you thorough setting up ProFTPD on Ubuntu with a MySQL backend for users and groups.
@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.

@Daniyaal is it only for FTP, right? I'd like to use SFTP instead.