&lt;IfModule mod_exec.c&gt;
    ExecEngine on
    ExecLog /var/log/ftpd/exec.log
    ExecOnConnect /path/to/script
  &lt;/IfModule&gt;
</pre>

<p>
This module will not work properly for <code>&lt;Anonymous&gt;</code> logins,
or for logins that are affected by <code>DefaultRoot</code>.  These directives
use the <code>chroot(2)</code> system call, which wreaks havoc when it
comes to scripts.  The path to script/shell interpreters often assume a certain
location that is no longer valid within a chroot.  In add