Installing VSFTPD on Ubuntu 14.04 Amazon EC2 Instance

Note: I had a brand new server and needed to run sudo apt-get dist-upgrade before installing the server to get all packages up to date. These steps don't take into account best practice security considerations. These are merely basic steps to get an FTP server up and running quickly.

Install the server.

sudo apt-get install vsftpd

Let's check to make sure the server is up and running before making any changes.

sudo netstat -a | grep ftp

If you see this after running the netstat command then life is good. If not, you'll need to troubleshoot why the server is not starting.

tcp        0      0 *:ftp                   *:*                     LISTEN

Make a backup copy of the config file just in case

sudo cp /etc/vsftpd.conf /etc/vsftpd.conf.backup

Add the following to the end of the /etc/vsftpd.conf file

pasv_address=[public dns from the amazon EC2 instance]

Now time to edit a couple other variables in the config file. The first one is write_enable which defaults to NO. Change this to YES so that you can upload files to the server. If you don't do this and try to upload something (i.e. from FileZilla) you will likely see an error message like, "Error: Critical file transfer error"

# Uncomment this to enable any form of FTP write command.

And if you want local users the ability to login, uncomment the local_enable line

# Uncomment this to allow local users to log in.

Save the file and restart the server.

sudo service vsftpd restart

Should see something like this

vsftpd stop/waiting
vsftpd start/running, process 1649

You will need to open up ports both on your server instance and via the Amazon security group to be able to connect. In this example:

TCP Ports 13000 - 13100
TCP Ports 20 - 21



If you need to install vsftpd on a centos server, you may find this article useful:

And how do I connect to it via filezilla?

At this point it's a standard FTP server so you would just need to get your server's IP or Public DNS and follow instructions from Filezilla on how to connect to a server:

To connect using FileZilla, you just need to go to File - Site manager - New site, and in the right panel, fill in below fields. Host : The Public IP of the EC2 instance where vsftpd is installed Port : Leave it as blank as it will use port 21 by default Login type : Normal Username : Your FTP username Password : Password Sometimes, you may see directory listing error. This is because the port range is not open in EC2. You need to have that opened or you need to switch to Active mode for connection. You can refer to pixelstech dot net/article/1422865204-Install-and-setup-vsftpd-on-AWS-server

Hi everyone, I am trying to configure a ftp server on AWS, I have installed vsftp and I am able to make login using ftp but when I try to create a folder I receive this error: 550 Create directory operation failed. I have give the full access to my ftpuser over the folder and all time is the same error, is annoying. I have run these commands: chown -R ftpuser /home/ftpuser && chmod -R 755 /home/ftpuser chown -R ftpuser /var/ftp && chmod -R 755 /var/ftp and the result is the same. Someone can help me??? Thanks.

Thank you, it's really helpfull!

Left something important after this nice Documentation:
You shouldn’t allow enable ftp access for root user. It is insecure and dangerous fro your production server. So, Just create a normal user on remote server (This user and pasword works to configure FileZilla) :
$ sudo adduser test

Lets check if our VSFTPD server is working from the server itself. To do so, run the following command from the Terminal:
$ sudo telnet localhost 2

Sample output:
Trying ::1...
Connected to localhost.
Escape character is '^]'.
220 Welcome to OSTechNix FTP service.

Success! We can able to access the FTP server locally. To exit from FTP console, just type: quit.
Lets try to access it from any remote system. Go to the remote system, and open up the Terminal, and access the FTP server as shown below.

$ ftp

Here, is my FTP server’s IP address.
Enter the FTP server’s username and password and READY!!!

I got this error after perform all steps provided by you. Currently I am using Ubuntu server (latest) on AWS ECS.

Disconnected: No supported authentication methods available (server sent: publickey)

Kindly tell me how to resolve this issue.