Installing the vsftpd FTP-server

This article goes through the steps you need to follow when installing a fast and secure vsftpd ftp-server that supports anonymous users for FreeBSD

About vsftpd

vsftpd (stands for a Very Secure FTP Daemon) is a FTP server that supports IPv6 and SSL. It is a default ftp-server in a number of GNU/Linux-based systems and their official repositories, such as ftp.debian.org, ftp.redhat.com (as of 2004). This is one of the fastest and most secure servers.


Installation

Update the ports:

portsnap fetch update

Make the server:

cd /usr/ports/ftp/vsftpd/ && make install clean

Check the box to install rc.d scripts, and support SSL (optionally).

[X] RC_NG install RC_NG script
[ ] VSFTPD_SSL  Include support for SSL

Edit /usr/local/etc/vsftpd.conf:

listen=YES
anonymous_enable=YES
local_enable=YES
write_enable=YES
anon_upload_enable=YES
anon_mkdir_write_enable=NO
anon_other_write_enable=NO
no_anon_password=YES
connect_from_port_20=YES
async_abor_enable=YES
use_localtime=YES
ftpd_banner=Welcome to ftp service
background=YES
chroot_local_user=YES
anon_root=/home/ftp
local_umask=755
secure_chroot_dir=/usr/local/share/vsftpd/empty

Create a directory for anonymous users and set privileges:

mkdir /home/ftp
mkdir /home/ftp/pub
mkdir /home/ftp/incoming
chmod 777 /home/ftp/incoming/
chown -R ftp:ftp /home/ftp

Specify start of vsftpd in /etc/rc.conf:

vsftpd_enable="YES"

Start the server:
/usr/local/etc/rc.d/vsftpd start

The server is ready to use.

  • Facebook
  • Digg
  • Google Gmail
  • MySpace
  • Yahoo Mail
  • WordPress
  • Reddit
  • Google Reader
  • Yahoo Bookmarks
  • Windows Live Spaces
  • Blogger Post
  • Ask.com MyStuff
  • Mixx
  • StumbleUpon
  • LinkedIn
  • Google Bookmarks
  • AOL Mail
  • Twitter
  • Share/Bookmark
Posted on September 29, 2010