Freebox-OS-munin
Freebox-OS-munin copied to clipboard
OSError: [Errno 30]
Hello,
I have got this error : 2020/04/14-08:15:15 [18005] OSError: [Errno 30] Read-only file system: '/etc/munin/plugins/Freebox-OS-munin/freebox.json' 2020/04/14-08:15:15 [18005] Service 'freebox-ftth' exited with status 1/0. 2020/04/14-08:15:18 [18005] Error output from freebox-temp:
How can I correct that ?
Regards
Hello !
It seems that you're experiencing a disk issue (Read-only file system):
- do you have enough free disk left?
- can you write on the partition that holds /etc? (try
touch /etc/munin/plugins/Freebox-OS-munin/test.txt)
Hello,
By default, systemd now prevents services from writing files to some locations. However, the Freebox plugin needs write permissions to /usr where is located the JSON file.
I disabled this protection in /etc/systemd/system/multi-user.target.wants/munin-node.service by modifying the following : #ProtectSystem=full ProtectSystem=false
There might be some better ways to deal with this issue, than disabling some important security, though :
- Move JSON file to a writable location by default
- Adding a custom config file instead of editing the default systemd file
- Trying ProtectSystem=strict
Regards, Julien
I am user pi on my Rpi.
If I put it in /home/pi, it should be fine ?
What should I write in the plugin/munin-node file ? Which user ? Which group ?
I have an other error : Error output from freebox-traffic: 2020/04/14-11:05:03 [1823] Can't exec "/etc/munin/plugins/freebox-traffic": No such file or directory at /usr/share/perl5/Munin/Node/Service.pm line 269, <STDIN> line 7.
As I execute each link manually, everything works perfectly...
I am user pi on my Rpi.
If I put it in /home/pi, it should be fine ?
No, because systemd also prevent access to /home. You will find more information here : https://www.freedesktop.org/software/systemd/man/systemd.exec.html#Sandboxing
Thanks but I do not see in which file I have to modify ?
As explained in https://github.com/chteuchteu/Freebox-OS-munin/issues/40#issuecomment-613253663 I modified /etc/systemd/system/multi-user.target.wants/munin-node.service. However it might be a better idea to create an override in /etc/systemd/system/munin-node.service.d/.
Okay, it works now !
Thanks !!
hi
I changed directory to /var/lib/munin-node/plugin-state/nobody/Freebox-OS-munin/freebox.json here munin can write without remove systemd protection.