Skip to main content
2 of 4
deleted 15 characters in body
Rui F Ribeiro
  • 58k
  • 28
  • 156
  • 238

Run a script(svr side) when FTP User logs off

I'd like to run a shell script on the server side when a FTP user logs off.

Imagine:

  1. Ftpuser logins, uploads a file to an inbound-only directory and logs off.
  2. Ftp Server detects logoff then runs FileCheckMove.sh
  3. FileCheckMove.sh checks/sanitizes any files from inbound-only and moves them to an alternate location.

What's the best way to detect ftp user logoff and initiate the event?

  • I've considered simply auto running the script every few minutes, but I don't want to attempt FileCheckMove.sh on a file that's open during its upload to the server.

This is Debian 9 stretch running ProFTPd.