[SoftNAS KB]: Setup of a FTP server

Setup of a FTP server (on Amazon AMI instance)


Customer cannot automatically send status report logs from SoftNAS node.


This might be because the mail server cannot access Internet directly. Because of the amount of data attaching logs as an email attachment is not preferred.


Install vsftpd

All commands should be run with ‘root’ user. Run the following command in terminal to install vsftpd package:

        # yum install vsftpd ftp -y

Configure vsftpd

Edit vsftpd configuration file /etc/vsftpd/vsftpd.conf,

        # nano /etc/vsftpd/vsftpd.conf

Find the following lines and make the changes as shown below:


 ## Set to "NO" ##


 ## Uncomment ##



 ## Add at the end of this  file ##



Start the vsftpd service and make it to start automatically on every reboot:

        # service vsftpd start

        # chkconfig vsftpd on


Create FTP user

By default, root user is not allowed to login to ftp server for security purpose. So let us create a testing user called “ftpuser” with password “centos”:

# useradd ftpuser# passwd ftpuser

Connecting to FTP server

Now let us try to connect to FTP server itself with user “ftpuser”:

# ftp

Connected to (

.220 Welcome to FTP service.Name ( ftpuser

331 Please specify the password.


230 Login successful.

Remote system type is UNIX.

Using binary mode to transfer files.




You might see the above error like “ftp:connect:No route to host”. To resolve this error, allow the default ftp port “21” through your firewall or router. In the server side, do the following.

Edit the file: /etc/sysconfig/iptables with the following command

        # nano /etc/sysconfig/iptables

Add the following lines.

  [...]-A INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT[...]

Save and exit the file. Restart iptables now:

        # service iptables restart