Freebox-OS-munin icon indicating copy to clipboard operation
Freebox-OS-munin copied to clipboard

OSError: [Errno 30]

Open titithebad opened this issue 5 years ago • 8 comments
trafficstars

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

titithebad avatar Apr 14 '20 06:04 titithebad

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)

quentin-st avatar Apr 14 '20 06:04 quentin-st

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

ruliane avatar Apr 14 '20 06:04 ruliane

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...

titithebad avatar Apr 14 '20 08:04 titithebad

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

ruliane avatar Apr 14 '20 11:04 ruliane

Thanks but I do not see in which file I have to modify ?

titithebad avatar Apr 14 '20 12:04 titithebad

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/.

ruliane avatar Apr 14 '20 12:04 ruliane

Okay, it works now !

Thanks !!

titithebad avatar Apr 15 '20 09:04 titithebad

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.

flob82 avatar Apr 17 '20 13:04 flob82