Product SiteDocumentation Site

17.2.4. Starting and Stopping vsftpd

The vsftpd RPM installs the /etc/rc.d/init.d/vsftpd script, which can be accessed using the service command.
To start the server, as root type:
~]# service vsftpd start
To stop the server, as root type:
~]# service vsftpd stop
The restart option is a shorthand way of stopping and then starting vsftpd. This is the most efficient way to make configuration changes take effect after editing the configuration file for vsftpd.
To restart the server, as root type:
~]# service vsftpd restart
The condrestart (conditional restart) option only starts vsftpd if it is currently running. This option is useful for scripts, because it does not start the daemon if it is not running.
To conditionally restart the server, as root type:
~]# service vsftpd condrestart
By default, the vsftpd service does not start automatically at boot time. To configure the vsftpd service to start at boot time, use an initscript utility, such as /sbin/chkconfig, /usr/sbin/ntsysv, or the Services Configuration Tool program. Refer to Chapter 9, Services and Daemons for more information regarding these tools.

17.2.4.1. Starting Multiple Copies of vsftpd

Sometimes one computer is used to serve multiple FTP domains. This is a technique called multihoming. One way to multihome using vsftpd is by running multiple copies of the daemon, each with its own configuration file.
To do this, first assign all relevant IP addresses to network devices or alias network devices on the system. Refer to Chapter 7, NetworkManager for more information about configuring network devices and device aliases. Additional information about network configuration scripts can be found in Chapter 8, Network Interfaces.
Next, the DNS server for the FTP domains must be configured to reference the correct machine. For information about BIND and its configuration files, refer to Section 13.2, “BIND”.
If there is more configuration files present in the /etc/vsftpd directory, calling service vsftpd start results in the /etc/rc.d/init.d/vsftpd initscript starting the same number of processes as the number of configuration files. Each configuration file must have a unique name in the /etc/vsftpd/ directory and must be readable and writable only by root.