rafaltrojniak / munin-multiping

Multiping plugin to Munin that runs pings in parallel using erlang
2 stars 1 forks source link

Permission issue? #1

Open livid opened 11 years ago

livid commented 11 years ago

After linked and configured, I got this error from munin-run multiping:

=ERROR REPORT==== 27-Jul-2013::12:22:28 === file:path_eval([".","/root"],".erlang"): permission denied

rafaltrojniak commented 11 years ago

Hello. Thanks for checking this plugin out.

There is no invocation of file:patch_eval in my plugin. This may be some issue in the escript process or something like that.

Please, provide other info :

livid commented 11 years ago

Is it possible to add something in your script to completely disable Erlang error report?

A run result below:

root@munin:/etc/munin/plugin-conf.d# munin-run multiping

=ERROR REPORT==== 27-Jul-2013::15:41:04 ===
file:path_eval([".","/root"],".erlang"): permission denied
001_mul_sjc01_us_krill_c3edge_net_rtt.value 9.947
001_mul_sjc01_us_krill_c3edge_net_lost.value  0
livid commented 11 years ago

I resolved it by putting user and group info under /etc/munin/plugin-conf.d:

[multiping]
user root
group root
env.host ...
rafaltrojniak commented 11 years ago

Hey, nice walk-around for that problem.

Disabling error reporting isn't the right way IMHO. We should disable the process that generates the error. In this way we will know what's wrong if something fails in the future.

The .erlang file is configuration file that is searched in the users home directory, that can contain any additional configuration. The problem here, is the HOME environment variable is propably set to /root, not for proper user home directory of munin user (for me it is /var/lib/munin). Please, try to change user and group for munin, and add this line

  env.HOME /var/lib/munin

This should move searching .erlang file from /root/.erlang to /var/lib/munin/.erlang, where You can create it securely.