How to add a new user to a vsftpd server

Assuming that you already have the vsftpd installed and configured, to create a new ftp user with an home directory you just need to use this commands.

The first thing you need  to do is to create an FTP root directory:

# mkdir <path_directory>

Then you should create an user and make the <path_directory> the user’s home directory:

# useradd -d <path_directory> <ftp_new_user>

Then add a password to the newly created user

# passwd <ftp_new_user>

Add <path_directory> permissions:

# chown <ftp_new_user> <path_directory>

# chmod 0744 <path_directory>

Restart the server:

# /etc/init.d/vsftpd restart

And it’s done!

Now you can access to this ftp account using the <ftp_new_user>