- Table of Contents
- Copyright
- About the Lead Authors
- About the Contributing Authors
- Acknowledgments
- Tell Us What You Think!
- Introduction
- I. Red Hat Linux Installation and User Services
- Chapter 1. Introduction to Red Hat Linux
- Chapter 2. Installation of Your Red Hat System
- Chapter 3. LILO and Other Boot Managers
- Chapter 4. Configuring the X Window System, Version 11
- Chapter 5. Window Managers
- Chapter 6. Connecting to the Internet
- Chapter 7. IRC, ICQ, and Chat Clients
- Chapter 8. Using Multimedia and Graphics Clients
- II. Configuring Services
- Chapter 9. System Startup and Shutdown
- Chapter 10. SMTP and Protocols
- Chapter 11. FTP
- Chapter 12. Apache Server
- Chapter 13. Internet News
- Chapter 14. Domain Name Service and Dynamic Host Configuration Protocol
- Chapter 15. NIS: Network Information Service
- Chapter 16. NFS: Network Filesystem
- Chapter 17. Samba
- III. System Administration and Management
- Chapter 18. Linux Filesystems, Disks, and Other Devices
- Chapter 19. Printing with Linux
- Chapter 20. TCP/IP Network Management
- Chapter 21. Linux System Administration
- Chapter 22. Backup and Restore
- Chapter 23. System Security
- IV. Red Hat Development and Productivity
- Chapter 24. Linux C/C++ Programming Tools
- Chapter 25. Shell Scripting
- Chapter 26. Automating Tasks
- Chapter 27. Configuring and Building Kernels
- Chapter 28. Emulators, Tools, and Window Clients
- V. Appendixes
- A. The Linux Documentation Project
- B. Top Linux Commands and Utilities
- C. The GNU General Public License
- D. Red Hat Linux RPM Package Listings
FTP Administrative Tools
Several are available to help you administer your FTP server. These tools were automatically installed as part of the wu-ftp package when the server was installed. These utilities help you see the current status of the server and control its shutdown procedure:
- ftprestart
- ftpshut
- ftpwho
- ftpcount
ftprestart
The ftprestart command performs the reverse of the ftpshut command, and is used to restart an FTP server that has been shut down. The format of ftprestart is as follows:
ftprestart -V
The -V option merely prints a version number.
ftpshut
The ftpshut command eases shutdown procedures of the FTP server. This capability, of course, applies only if you are running the server all the time—instead of leaving it to be invoked from inetd as needed. The format of ftpshut is as follows:
ftpshut -l login-minutes -d drop-minutes time warning message
login-minutes is the number of minutes before server shutdown that the server will begin refusing new FTP transactions. drop-minutes is the number of minutes before server shutdown that the server will begin dropping existing connections. The default value for login-minutes is 10, and the default for drop-minutes is 5.
time is the time at which the server will be shut down. You can specify this time one of three ways. The first is to specify the time in military format without the colon (for example, 0312 to indicate 3:12 a.m.). The second is to specify the number of minutes to wait before shutting down. The format of this method is + min,, where min is the number of minutes to wait (for example, +60 shuts the server down in 60 minutes). The last option is the most drastic; if you specify the string now, the server shuts down immediately.
warning message is the message displayed to all FTP clients, instructing them that the server will be shut down. See the description of the shutdown command for the /etc/ftpaccess file earlier in this chapter for details on the formatting available for the warning message.
ftpwho
ftpwho displays all the active FTP users on the system. The output of the command is in the format of the /bin/ps command. The format of this command follows:
pid tty stat time connection details
pid is the process ID of the FTP daemon handling the transfer; tty is always a question mark (?) because the connection is coming from FTP, not Telnet; stat is the status of that particular instance of the daemon, where S means it's sleeping, Z means it has crashed (gone zombie), and R means it's the currently running process. time indicates how much actual CPU time that instance of the FTP has taken. Finally, connection details tells where the connection is coming from, who the user is, and that user's current function.
The following is an example of output from ftpwho:
Service class all: 1184 ? SN 0:00 ftpd: dell.home.org: anonymous/horsey@sawbill.com: IDLE 1181 ? SN 0:00 ftpd: green.home.org: bball: IDLE - 2 users (-1 maximum)
Here you can see that two users are logged in. (An unlimited number of users are allowed to connect). The first user is an anonymous user who claims to be horsey@sawbill.com and is currently not performing any functions. The second user, who has the username bball, is currently also idle.
ftpcount
ftpcount, which is a simplified version of ftpwho, shows the current total of users in each class defined in /etc/ftpaccess. A sample output from ftpcount shows the following:
Service class all - 2 users ( -1 maximum)
Using FTP Clients | Next Section

Account Sign In
View your cart