The problem is the supplied utility, 'ftpshut', only creates the message file in the actual location as indicated in the shutdown directive.
In the INSTALL file of wu-ftpd 2.4.* it is recommended to create a link in order for shutdown to work properly for real and anonymous user, e.g. If you use 'ftpshut', it will create a message file at the location specified in the ftpaccess shutdown directive.
When you are ready to remove the shutdown message file, you have to do so manually. (Ever had to go look in the ftpaccess file for its location because you forgot ...;-))
The following changes to 'ftpshut.c' and the new utility 'ftprestart' implement a means of shutting down the system that makes it convenient for the admin and does not require that you leave unresovled sybolic links scattered around your filesystems.
There are two files here, ftpshut and ftprestart. The copy of ftpshut.c included below was originally taken from BETA-13.
PLEASE NOTE: In order to get the virtual FTP server support described below you need to specify -DVIRTUAL in the appropriate makefile for your system.
The source is available here in a shar file.
The copy of ftpshut.c supports shutting down the server for both real users as well as guest accounts. It also supports virtual FTP servers.
Configurations:
------------------ Example segment ------------------ shutdown /etc/shutmsg # Virtual Server at 10.10.10.2 (ftp.some.domain) virtual 10.10.10.2 root /servers/some.domain/ftp virtual 10.10.10.2 banner /servers/some.domain/ftp/etc/msgs/banner.msg virtual 10.10.10.2 logfile /var/log/servers/some.domain/xferlog # Virtual Server at 10.10.10.10 (ftp.someother.domain) virtual 10.10.10.10 root /servers/someother.domain/ftp virtual 10.10.10.10 banner /servers/someother.domain/ftp/etc/msgs/banner.msg virtual 10.10.10.10 logfile /var/log/servers/someother.domain/xferlog ------------------Shutdown message files are created at
/etc/shutmsgEach file contains the same information.
/servers/some.domain/ftp/etc/shutmsg
/servers/someother.domain/ftp/etc/shutmsg
ftprestart is used when you are ready to re-enable your FTP server. It does the opposite of ftpshut and removes shutdown message files that were created by ftpshut. It will remove the system-wide shutdown message file as well as the shutdown message files in the anonymous ftp areas and any virtual ftp server areas.
Sample output:
ftprestart: /servers/some.domain/ftp/etc/shutmsg removed.
ftprestart: /servers/someother.domain/ftp/etc/shutmsg removed.
ftprestart: /etc/shutmsg removed.
These modifications are being included in a future version of wu-ftpd.
---
Kent Landfield Phone: 1-817-545-2502
The Landfield Group FAX: 1-817-545-7650
Email: [email protected] http://www.landfield.com/
Please send comp.sources.misc related mail to [email protected].
Search the Usenet Hypertext FAQ Archive at http://www.landfield.com/faqs/