Fix ftp/vsftpd issues in Ubuntu server

This is a quick post describing some issues that you may face while installing/running vsftpd in Ubuntu host. I will quickly walk through steps, beginning with installation and then configuration for general purpose FTP access.

1. Install and run vsftpd without login shell

Most obvious thing while running a ftp server is to run it under non login shell. This is quite easy in Redhat based distro but here in Ubuntu, you need to do something extra also to enable users accessing ftp running under non login shell.

Install vsftpd server and start it:

$ apt-get install vsftpd
$ /etc/init.d/vsftpd start

FTP Error: Could not write to socket: Broken pipe

By viewing this error while using your ftp server, you may get the impression of some bug/problem in your ftp server. This is exactly what happened in the early morning when I got call that vsftpd server in one of the Amazon EC2 server stopped working. When trying to transfer a file it’s showing something like this:

Error: Could not write to socket: Broken pipe
Unable to download file xxxx

In first, I checked the config of vsftpd, and restarted it. It’s working fine. Then got the clue from “unable to download file” messages which indicates that ftp server is not able to write/download file. When I checked the space:

Install and Configure FTP Server in Amazon EC2 instance

For many users, running FTP Sever in Amazon EC2 instance is headache at the first time. You need to experiment before being able to transfer data. The main problems are Ingress firewall in Amazon environment and NAT traversal.

Here I’m using vsftp (vsfptd) Server, which is one of the most popular and easy to configure. The instance is running from base Fedora 4 AMI but the setup should be identical to other Red Hat based distros.

Install vsftpd FTP server, if not installed earlier:

$ yum install vsftpd
Get Adobe Flash playerPlugin by wpburn.com wordpress themes