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.



:/# 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 Öhrström May 22 '17 at 11:38
  • Also; to make the content editable in FTP; I did sudo chmod -R 775 /var/www/trinity – Jonathan Öhrström May 23 '17 at 10:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.