The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Notification upon FTP login

Discussion in 'General Discussion' started by Bailey, Aug 29, 2007.

  1. Bailey

    Bailey Well-Known Member

    Joined:
    Aug 12, 2001
    Messages:
    120
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Wisconsin
    I would like to receive a notification anytime someone successfully logs in via FTP on a server -- for all FTP accounts... like the notification for SSH logins.

    How do I do this?

    Thanks :)

    :D Bailey
     
  2. AlexV.

    AlexV. Well-Known Member

    Joined:
    Jun 15, 2006
    Messages:
    212
    Likes Received:
    1
    Trophy Points:
    16
    Bailey:

    All the succsesfull FTP logins as well as failures are logged into /var/log/messages.

    Example:
    Aug 29 12:24:44 c5-2 pure-ftpd: (?@127.0.0.1) [INFO] New connection from 127.0.0.1
    Aug 29 12:24:49 c5-2 pure-ftpd: (?@127.0.0.1) [WARNING] Authentication failed for user [root]
    Aug 29 12:25:12 c5-2 pure-ftpd: (?@127.0.0.1) [INFO] New connection from 127.0.0.1
    Aug 29 12:25:17 c5-2 pure-ftpd: (?@127.0.0.1) [WARNING] Authentication failed for user [ftptest]
    Aug 29 12:25:27 c5-2 pure-ftpd: (?@127.0.0.1) [INFO] Logout.
    Aug 29 12:27:36 c5-2 pure-ftpd: (?@127.0.0.1) [INFO] New connection from 127.0.0.1
    Aug 29 12:28:02 c5-2 pure-ftpd: (?@127.0.0.1) [INFO] domain@domain.com is now logged in
    Aug 29 12:28:09 c5-2 pure-ftpd: (domain@domain.com@127.0.0.1) [INFO]
    Logout.

    You should be able to code a script that parses that info and sends you an e-mail via some sort of cron.

    Or you can always read the documentation for the ftp server you are using (prodtpd or pureftpd) and see if they have a mechanism that handles your inquiry aready available.
     
Loading...

Share This Page