Translation(s): English - Русский - Français


Installing and configuring FTP server vsftpd.

Introduction

vsftpd - Very Secure FTP Daemon

Installation

As usual, installation is very simple with apt-get or Aptitude. As root run:

aptitude install vsftpd

After installing, the server starts automatically and listens on TCP port 21 by default.

You can check it within netstat:

# netstat -npl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN      22468/vsftpd    

If your host does not have a firewall, it is recommended to stop vsftpd before configuring.

/etc/init.d/vsftpd stop

Configuration

The configuration file for this server is /etc/vsftpd.conf. You can find example configuration files in /usr/share/doc/vsftpd/EXAMPLE.

The configuration file has three option types:

If certain options are not present in the configuration file, the server will be use default parameters (see man vsftpd.conf).

Anonymous access

By default, only anonymous connections to directory /srv/ftp/ is allowed.

If you want to disable this, change:

anonymous_enable=NO

For enabling anonymous uploading, set:

For enabling changes to ownership, set:

chown_uploads=YES
chown_username=username

User access control

To enable authorized local users, uncomment:

local_enable=YES

To enable write access:

write_enable=YES

Advanced configuration