munin-monitoring / munin

Main repository for munin master / node / plugins
http://munin-monitoring.org
Other
1.99k stars 474 forks source link

Missing group name in init file commands #1599

Closed BETLOG closed 11 months ago

BETLOG commented 11 months ago

the period(.) in: cat /etc/init.d/munin chown munin. /var/cache/munin/www

it doesn't seem to register as an error, and has the same outcome, but it isnt mentioned in man chown and it certainly doesnt look right.

niclan commented 11 months ago

This looks like a issue going back to the installation time. chown can take user and group arguments e.g. like this: chown munin.www-data /var/cache/munin/www where the second argument is the group and will often be the group the web-server runs as.

What it looks like is that the name of the group was not filled correctly at install time.

BETLOG commented 11 months ago

I have never noticed this before, but I just installed munin on a machine so i could look at it's default permissions/ownership for another problem i'm having... and it seems the period is making an appearance there:

root@betlogbeast:/home/user# systemctl status munin
● munin.service - LSB: Create munin master directories on boot
     Loaded: loaded (/etc/init.d/munin; generated)
     Active: active (exited) since Thu 2023-11-23 20:34:17 AEST; 7min ago
       Docs: man:systemd-sysv-generator(8)
    Process: 94266 ExecStart=/etc/init.d/munin start (code=exited, status=0/SUCCESS)
        CPU: 10ms

Nov 23 20:34:17 betlogbeast systemd[1]: Starting munin.service - LSB: Create munin master directories on boot...
Nov 23 20:34:17 betlogbeast munin[94273]: chown: warning: '.' should be ':': ‘munin.’
Nov 23 20:34:17 betlogbeast munin[94266]:  * Starting Preparing munin directories munin
Nov 23 20:34:17 betlogbeast systemd[1]: Started munin.service - LSB: Create munin master directories on boot.

And afaik the chown syntax is with a colon, btw. At least its the only delineation documented in my OS. chown munin:munin etc

niclan commented 11 months ago

Where does your init file for munin originate? What is your OS? It's correct that : is the traditional delimiter but . has been acceptable on a number of OSes for a number of years.

But whatever the history of the chown command: the group name that was supposed to be there was not set during install time and so it's missing in the installed files.