Skip to main content

Does the public_html/error_log file pose any security issues?

Comments

4 comments

  • ElviCities
    With a standard installation, you shouldn't be generating any error_log in your public_html directory. Something else must have been installed, such as a CMS, that is generating application specific error logs. Otherwise your logs should be in either /var/logs or /usr/local/apache/logs
    0
  • quizknows
    PHP itself will frequently make error_log files in whatever directory the script is in. That said, a standard httpd.conf on a cPanel system should already contain this entry to block public disclosure of those files. You should not need to add this yourself.
    Order allow,deny Deny from all Satisfy All
    As long as you get denied by Apache when trying to load site.com/error_log then you are OK. If someone malicious has already gained enough access to read the error_log file through another means, the error_log files are the least of your worries.
    0
  • Richardbt71
    The error_log located there, and sub-directory, is where PHP logs errors. Just because it is in public directory, does not mean everyone can access it. Try it. When I do it, I get an 403,
    0
  • cPanelMichael
    Hello, Yes, as mentioned, there's an entry in the Apache configuration file by default to block requests to that file name:
    Order allow,deny Deny from all Satisfy All
    Thank you.
    0

Please sign in to leave a comment.