I'm trying to use vsftpd to create a FTP server on my ubuntu machine.

I'm also using apache2 to host websites.

How can I setup vsftpd to connect a specific user directly to the /var/www/<websitename>/public_html folder?

I want user trinity to connect to ftp and instantly get directed to the /var/www/trinityplay.net/public_html folder. The user is supposed to be able to create, edit and delete files within that folder.

While user walle is supposed to connect directly to /var/www/wallinphotography.net/public_html and also be able to create, edit and delete files within that folder.

  • Updated the post to be more descriptive
    – Jonathan
    Commented May 11, 2017 at 12:23

1 Answer 1



:/# mkdir /var/www/trinityplay.net/public_html
:/# adduser --home /var/www/trinityplay.net/public_html trinity

same pattern for other users and their home directories

check your permissions with

:/# ls -ld /var/www/trinityplay.net/public_html

if you get a 500 vsftp error you may need to
add the following line in /etc/vsftp.conf



  • Hi, that was pretty much what I did in the end! I did however work out another way of organizing the folders & users. Let's say I have a customer who has 2 websites on my server, then I made a folder for his FTP username and in that folder I put the websites' folders. Example: /var/www/trinity/trinityplay.net and /var/www/trinity/trinityliferpg.com. Might be useful for anyone reading this and wanting a organized FTP! :)
    – Jonathan
    Commented May 22, 2017 at 11:38
  • Also; to make the content editable in FTP; I did sudo chmod -R 775 /var/www/trinity
    – Jonathan
    Commented May 23, 2017 at 10:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .