2

I recently installed munin on my (Fedora based) server. Now, I wanted to get all the graphs in a static directory (The application runs on Django). So, I edited the file \etc\munin\munin.conf by setting the htmldir as the absolute path to my static folder. Then, when I did a munin-cron, I got the following error:

This program will easily break if you run it as root as you are
trying now.  Please run it as user 'nobody'.  The correct 'su' command
on many systems is 'su - munin --shell=/bin/bash'
Aborting.

So, I changed the user and tried running the same with munin as a user. I then got the following error:

[ERROR] Could not copy contents from /etc/munin/static/ to /[path to static 
file] at /usr/share/perl5/vendor_perl/Munin/Master/HTMLOld.pm line 716.

I chown-ed the static directory (recursively for the munin user) and even tried with chmod 777 (which actually one shouldn't do), so basically it doesn't seem to be a permission issue.

Also, my dev server is Ubuntu (12.04) based. It worked fine there. It worked fine even with my local machine running Ubuntu (14.04). Can this be an OS issue? That is highly unlikely it seems. What other thing could I be missing? Any help would be appreciated.

PS: There is one more catch. When I ran munin-cron as root in my Ubuntu(s), the error it gave was:

This program will easily break if you run it as root as you are
trying now.  Please run it as user 'munin'.  The correct 'su' command
on many systems is 'su - munin --shell=/bin/bash'
Aborting.

whereas it was nobody here. Can it be a configuration issue?

Ranveer
  • 6,683
  • 8
  • 45
  • 92

1 Answers1

0

I had same issue on CentOS 6.5. None possible permissions fixed this. So I had to run the cron under root's crontab behalf of munin user. Sounds crazy, but it works:

  • Trigger the cron under root's crontab:
    • Add this to root's crontab */5 * * * * sudo -u munin crontab -e
    • Comment out this line Defaults requiretty in /etc/sudoers
Johnny Vietnam
  • 196
  • 1
  • 6