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.

View logs for all ips that accessed specific file

Discussion in 'General Discussion' started by Imad Sa, Oct 30, 2015.

  1. Imad Sa

    Imad Sa Registered

    Joined:
    Oct 30, 2015
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Hi there,

    Assuming that I have a php file on a website on a cpanel account and there is a file ( malware ) which is scary!

    How do I view the logs that are recorded for this file? like when was it uploaded? what was the ip? and ips that viewed this from browser?

    Please help!
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,146
    Likes Received:
    34
    Trophy Points:
    48
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hello,

    You have root access of our server to that you can check this through command line. Login your server with the SSH and try with the following command

    Code:
    cd  /home/user_name/access-logs
    grep file_name *
    
    OR
    grep file_name domain_name
    
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    651
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    You can review /usr/local/cpanel/logs/access_log if the file was uploaded through File Manager in cPanel. Otherwise, the Apache logs are found in /usr/local/apache/domlogs/ and FTP logs are found in /var/log/messages.

    Thank you.
     
Loading...

Share This Page