0

I want Munin to graph nginx error codes, so I tried a couple of plugins I found:

Both of them work fine if I run them manually as root, but not if they are run by Munin. The problem seems to be that they try to access /var/log/nginx/access.log, and the user under which the plugins run does not have permission to do so.

I don't want to change permissions on /var/log/nginx or any of the log files. I tried to give the scripts the setuid bit, and they both are owned by root, but that still does not make a difference.

How can I solve this problem?

smonff
  • 346
  • 2
  • 5
  • 15
fulv
  • 113
  • 5

1 Answers1

2

Add munin user to adm group. This is the default group which can access logfiles.

Ipor Sircer
  • 1,226
  • 7
  • 8
  • Thanks! I found this: http://munin-monitoring.org/wiki/faq#Q:CanImakethepluginrunasanotherusergroupthannobodynogroup, so now I can run the nginx_error plugin as root, and it works. – fulv Aug 14 '16 at 20:57