Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permission issue? #1

Open
livid opened this issue Jul 27, 2013 · 4 comments
Open

Permission issue? #1

livid opened this issue Jul 27, 2013 · 4 comments

Comments

@livid
Copy link

livid commented Jul 27, 2013

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
Copy link
Owner

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 :

  • Is the munin-node running as root, or other user ?
  • Is the file /root/.erlang existing
  • What version of erlang are You using ?

@livid
Copy link
Author

livid commented Jul 27, 2013

  • I'm runing munin-run multiping as root
  • I tried to put a file in /root/.erlang, error still appears
  • Erlang version: R14B04 under Ubuntu 12.04, installed with apt-get install erlang-base

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
Copy link
Author

livid commented Jul 28, 2013

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

[multiping]
user root
group root
env.host ...

@rafaltrojniak
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants