26.2.3. Starting and Stopping vsftpd
vsftpdRPM installs the
/etc/rc.d/init.d/vsftpdscript, which can be accessed using the
To start the server, as root type:
service vsftpd start
To stop the server, as root type:
service vsftpd stop
restartoption 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
To restart the server, as root type:
service vsftpd restart
condrestart(conditional restart) option only starts
vsftpdif 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
vsftpdservice does not start automatically at boot time. To configure the
vsftpdservice 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 18, Controlling Access to Services for more information regarding these tools.
126.96.36.199. Starting Multiple Copies of
Sometimes one computer is used to serve multiple FTP domains. This is a technique called multihoming. One way to multihome using
vsftpdis 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 17, Network Configuration for more information about configuring network devices and device aliases. Additional information can be found about network configuration scripts in Chapter 16, 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 Chapter 19, Berkeley Internet Name Domain (BIND).
vsftpdto answer requests on different IP addresses, multiple copies of the daemon must be running. The first copy must be run using the
vsftpdinitscripts, as outlined in Section 26.2.3, “Starting and Stopping
vsftpd”. This copy uses the standard configuration file,
Each additional FTP site must have a configuration file with a unique name in the
/etc/vsftpd/directory, such as
/etc/vsftpd/vsftpd-site-2.conf. Each configuration file must be readable and writable only by root. Within each configuration file for each FTP server listening on an IPv4 network, the following directive must be unique:
Replace N.N.N.N with the unique IP address for the FTP site being served. If the site is using IPv6, use the
Once each additional server has a configuration file, the
vsftpddaemon must be launched from a root shell prompt using the following command:
vsftpd /etc/vsftpd/<configuration-file>[amp ]
In the above command, replace <configuration-file> with the unique name for the server's configuration file, such as
Other directives to consider altering on a per-server basis are:
For a detailed list of directives available within
vsftpd's configuration file, refer to Section 26.2.5, “
To configure any additional servers to start automatically at boot time, add the above command to the end of the