login-event-processor NcFTPd general.cf file configuration
Don't forget to restart NcFTPd after modifying the general.cf file.

You can have external programs react to events in near real time. For example, if you wanted to run a script every time a user logged in, you would set login-event-processor to the full pathname of the script.  The server will then run that script each time, with various command line arguments.

Obviously I do not recommend using this facility unless you absolutely need to, for two important reasons:

  1. Spawning and executing programs impacts system performance.
  2. The programs are run with root privileges -- unless you are very experienced with writing secure programs, you could mistakenly leave your system vulnerable to malicious local users.
A safer way is to use the ncftpd_eventd feature, and have your own program receive messages from NcFTPd.

Nevertheless, if you wish to proceed, you can look at the process_ncftpd_event.sh script which comes with the distribution as an example.


Recommendation: See Also:
Previous: log-xfers NcFTPd Home Next: login-timeout