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.

Possible to know the last FTP acces for a user?

Discussion in 'General Discussion' started by GremaudSimon, Aug 31, 2012.

  1. GremaudSimon

    GremaudSimon Registered

    Joined:
    Aug 31, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello,

    I would like to know if it's possible to know when a user logged in via ftp for the last time.

    Thx in advance :)
     
  2. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    I think the only FTP history you would find is in /var/log/messages*. Depending upon how your particular OS rotates the logs, you might find the info in /var/log/messages, /var/log/messages.1|2|3|4, /var/log/messages*.tgz.

    On a typical CentOS server, for instance, you have about 1 month worth of /var/log/messages* logfiles. They rotate weekly. /var/log/messages is most recent, /var/log/messages.1 is a week older, /var/log/messages.2 is two weeks older, etc.

    So if you know the username, I would attempt to do this:

    grep username /var/log/messages*|grep logged -- where 'username' is the particular username you are interested in

    That will give you a list of the dates/times that a particular username has logged in. Now, if that user hasn't logged in for over a month, you aren't going to find it in the logs on CentOS. [Your OS install may differ with regard to how long logs are held / rotated].

    M
     
  3. ruzbehraja

    ruzbehraja Well-Known Member

    Joined:
    May 19, 2011
    Messages:
    383
    Likes Received:
    7
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    WHM >> Raw FTP Log Download should also provide information of any files transmitted between hosts and maybe useful.
     
  4. niladam

    niladam Member

    Joined:
    Aug 29, 2007
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Romania
    cPanel Access Level:
    Root Administrator
    It's faster to use:

     
  5. GremaudSimon

    GremaudSimon Registered

    Joined:
    Aug 31, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thank you, I will show this soluce :)

    I've already look the Raw FTP Logs but there is only informations about the downloads/uploads, not for the last login.
    Thank you :)


    Thank you very much :)
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    As mentioned, the following log file is very useful for FTP login information:

    Code:
    # /var/log/messages
    Were you able to find the necessary information with this log file?

    Thank you.
     
Loading...

Share This Page