FTP Server

Installing ProFTP:

Many servers will either require or at least occasionlly require FTP access in order to transfer files from remote locations. While FreeBSD does come configured with a default FTP server installation (depending on how you installed the OS) it is not necessarily the most secure choice.

This tutorial will cover installing and configuring the ProFTP daemon as a replacement for that default FTP server daemon.

The first step, as always, will be to install the proftpd port from the ports collection.

# cd /usr/ports/ftp/proftpd
# make all install clean
# mv /usr/local/etc/rc.d/proftpd.sh.sample /usr/local/etc/rc.d/proftpd.sh

The next step will be to configure the startup scripts and conf file.

Configuring ProFTP:

First let's edit the startup scripts and other necessary files:

# mv /usr/local/etc/rc.d/proftpd.sh.sample /usr/local/etc/rc.d/proftpd.sh
# chmod 750 /usr/local/etc/rc.d/proftd.sh
# vi /etc/pam.conf
Add the following lines
ftpd auth required pam_unix.so try_first_pass
ftpd account required pam_unix.so try_first_pass
ftpd session required pam_permit.so

To see all of the available options please check with the man pages:

The conf file we will need to edit in order to configure proftpd is stored in the /usr/local/etc folder

# vi /usr/local/etc/proftpd.conf

Here is a sample of what you could have

# vi /usr/local/etc/proftpd.conf
Here is a sample of what you can have
ServerName "Synerstream FTP Server"
ServerType standalone
DefaultServer on
TimeoutLogin 30
DefaultRoot / wheel
DefaultRoot /usr/ftp/ staff
RequireValidShell off
Port 21
Umask 022
MaxInstances 30
User nobody
Group nogroup

AllowOverwrite on

Now you can start and test your FTP server.

# /usr/local/etc/rc.d/proftpd.sh start