Possible to know the last FTP acces for a user?

mtindor

Well-Known Member
Sep 14, 2004
1,363
65
178
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
 

GremaudSimon

Registered
Aug 31, 2012
2
0
1
cPanel Access Level
Root Administrator
grep username /var/log/messages*|grep logged -- where 'username' is the particular username you are interested in
M
Thank you, I will show this soluce :)

WHM >> Raw FTP Log Download should also provide information of any files transmitted between hosts and maybe useful.
I've already look the Raw FTP Logs but there is only informations about the downloads/uploads, not for the last login.
Thank you :)


It's faster to use:
Thank you very much :)
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,213
363
I've already look the Raw FTP Logs but there is only informations about the downloads/uploads, not for the last login.
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.