ProFTPD and WU-FTPD Server Tools

 < Day Day Up > 



Both the WU-FTPD and ProFTPD daemons provide a set of FTP tools you can use to manage your FTP server. With the ftpshut command, you can smoothly shut down a running server, warning users of the shutdown well before it happens. ftpwho can tell you who is currently connected and what they are doing. ftpcount can give you the number of connections currently in effect. Although each daemon has its own set of tools, they perform the same action with much the same set of options. Tools provided by both ProFTPD and WU-FTPD have the same name and options, though ProFTPD provides more information on virtual hosts and has some added options.

ftpshut

With the ftpshut command, you can have the FTP server shut down at a given time, rather than suddenly shutting it down by killing its process. This gives you the chance to warn users the server is shutting down and not to start any long downloads. ftpshut takes several options for specifying the time and including a warning message. ftpshut takes as its arguments the time until the shutdown, followed by the warning message you want sent to users. The time can be a word such as "now" that effects an immediate shutdown, a + sign with the number of minutes remaining, or a specific time of day indicated by an HHMM format, where HH is the hour in a 24-hour cycle and MM is the minute. The following example shuts down the FTP server in ten minutes, issuing a warning to users:

ftpshut +10  "Shutdown in ten minutes"

Shutdown disables any new FTP access ten minutes before a scheduled shutdown, though this can be changed using the -l option with the number of minutes you want. Five minutes before a scheduled shutdown, all current connections are disconnected. You can adjust the time with the -d option. The warning message is formatted at 75 characters, and you can use special formatting symbols for in-place substitutions of certain values in the warning message, such as the shutdown time. These symbols are called magic cookies. For example, %s is the shutdown time, %r is the time when new connections are refused, %d is the time when current connections are cut, %M is the maximum number of users, and %L is the local hostname.

ftpwho and ftpcount

With the ftpwho command, you can find out who is currently connected to your FTP server. ftpwho shows the current process information for each user. The output displays five fields: the process ID, the tty connection, the status of the connection, the amount of CPU time used so far for the process, and the connection details. The status of the connection is R for running, S for sleeping, and Z for crashed. The connection details include the Internet address from where the connection is made, the user making the connection, and the task currently being performed, such as downloading a file. The field begins with the name of the FTP daemon, usually ftpd, followed by the different segments separated by colons.

The ftpcount command displays the number of users connected to your FTP server, broken down according to the classes specified in your .ftpaccess file. Along with the number of users, it shows the maximum number allowed to connect.



 < Day Day Up > 



Red Hat(c) The Complete Reference
Red Hat Enterprise Linux & Fedora Edition (DVD): The Complete Reference
ISBN: 0072230754
EAN: 2147483647
Year: 2004
Pages: 328

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net