1

I'm managing a server running Debian 7 Wheezy. I'd like to add a new feature to the /var/log/syslog file.

That is a sample current output:

Jul 31 13:06:35 myserver mod_evasive[7629]: Couldn't open logfile /var/log/apache2/evasive/dos-XX.XX.XXX.XXX: Permission denied

(I've changed the IP for privacy).

How can I write the name of the user that attempts to write (or in general, does an operation)?

  • 2
    rsyslog or syslog-ng? – Rui F Ribeiro Jul 31 '16 at 13:35
  • 1
    The user of the process doing the logging, or the user that caused the process to log? In your case, do you want the userid of the apache process 7629 or the user that made apache call mod_evasive ? – Stephen Harris Jul 31 '16 at 15:49
  • RuiFRibeiro rsyslog @StephenHarris Would be nice to show both. – Mario Villani Jul 31 '16 at 16:28
  • @StephenHarris What should i do? – Mario Villani Aug 1 '16 at 8:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.