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.

How do I find a certain time period of logins?

Discussion in 'Security' started by JustOne, Apr 7, 2012.

  1. JustOne

    JustOne Registered

    Joined:
    Mar 31, 2012
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I'm interested to know if there's a way I can find to go through the logs on the server when someone uploads a file via cPanel or ftp during a certain time frame.

    I use cat var/log/messages | grep username, but it gives me only recent date, not dates from previously, i.e a week a ago or a month. Is there a way or command I could use that would show me how I can find it? Thanks :D
     
  2. minosjl

    minosjl Well-Known Member

    Joined:
    Jun 4, 2011
    Messages:
    168
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hi,

    As far I know the cPanel file manager log will written in "/usr/local/cpanel/logs/access_log" and all ftp access will be logged in the file "/var/log/messages" that you have already specified. Did you verified these logs?

    What kind of information you are missing in these files ?

    Thank you.
     
  3. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    If you have logrotate set to archive logs, then /var/log/messages should have archives (possibly specified as /var/log/messages.1, /var/log/messages.2 and so on for up to 4 weeks of logs). You should be able to grep for information in those other logs:

    Code:
    grep information /var/log/messages*
    This will search all the possible messages log files (messages, messages.1, etc.) for the search term. Simply replace information with the specific search term.
     
  4. JustOne

    JustOne Registered

    Joined:
    Mar 31, 2012
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thank you for the tips everyone :D
     
Loading...

Share This Page