12.2.4. Starting and Stopping vsftpd
The vsftpd
RPM installs the /etc/rc.d/init.d/vsftpd
script, which can be accessed using the systemctl
command.
To start the server, as root
type:
systemctl start vsftpd.service
To stop the server, as root
type:
systemctl stop vsftpd.service
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:
systemctl restart vsftpd.service
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:
systemctl condrestart vsftpd.service
By default, the
vsftpd
service does
not start automatically at boot time. To configure the
vsftpd
service to start at boot time, use a service manager such as
systemctl
. See
Chapter 6, Services and Daemons for more information on how to configure services in Fedora.
12.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. For more information about configuring network devices, device aliases, and additional information about network configuration scripts, refer to the Red Hat Enterprise Linux 7 Networking Guide.
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 the Red Hat Enterprise Linux 7 Networking Guide.
If there is more configuration files present in the /etc/vsftpd
directory, calling systemctl start vsftpd.service
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
.