[Errno 13] Permission denied (munin)[SOLVED]

I got some sensors on a grovepi (RPI 3) and I am using them in order to see their values online.
So, I’m doing a script in Python to put the values on Munin ( http://munin-monitoring.org/).

First, I tried some Python scripts and it works (https://gist.github.com/tomoconnor/813813)

But, I think I am not able to insert the following line in the script : import grovepi
I got this error :

pi@dex:~ $ sudo munin-run tmp_number
Traceback (most recent call last):
File “/etc/munin/plugins/tmp_number”, line 6, in
import grovepi
File “build/bdist.linux-armv7l/egg/grovepi.py”, line 66, in
bus = smbus.SMBus(1)
IOError: [Errno 13] Permission denied

Apparently, it’s a problem of permission but I can execute any scripts from the sensors in any files, so I got the permission with i2c. I think the problem comes from munin because I have to put my code only in this directory : /etc/munin/plugins/nameofthefile

Some doc on the config on Munin : http://www.aymerick.com/2013/12/25/munin_client_on_raspberrypi.html

I forgot to say that I can execute the script in Python ( sudo python tmp_number) but I can’t launch it with munin.


I have never used munin before but it looks like munin is the one which is actually running the script but is not running them as root, which is causing the i2c errors.

Can you try following the tutorial here or here to give access to I2C to the other users too and see if that helps


I followed the first tutorial and this is working, thank you @karan

This topic was automatically closed after 24 hours. New replies are no longer allowed.