Moode Forum
[PROBLEM] logrotate: log2ram permission problem - Printable Version

+- Moode Forum (https://moodeaudio.org/forum)
+-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3)
+--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7)
+--- Thread: [PROBLEM] logrotate: log2ram permission problem (/showthread.php?tid=7626)



logrotate: log2ram permission problem - dheijl - 04-11-2025

On one of my Moode players, both 9.3 (upgraded), I noticed this in journalctl:


Apr 11 00:00:00 marantz logrotate[70736]: error: Ignoring log2ram because the file owner is wrong (should be root or user with uid 0).

log2ram eventually fills up on this player, that's why I checked.

My other player properly cleans out log2ram every day.

Is there an easy way to fix or should I just reinstall?

Thanks


RE: logrotate: log2ram permission problem - Tim Curtis - 04-11-2025

What was the journalctl command that you used?


RE: logrotate: log2ram permission problem - Tim Curtis - 04-11-2025

Nvm.

This is prolly the cause of the logrotate error.
Code:
pi@moode9scn:~ $ ls -l /etc/logrotate.d/
total 52
-rw-r--r-- 1 root root 120 Feb 14  2023 alternatives
-rw-r--r-- 1 root root 173 May 25  2023 apt
-rw-r--r-- 1 root root 130 Oct 14  2019 btmp
-rw-r--r-- 1 root root 112 Feb 14  2023 dpkg
-rw-r--r-- 1 pi   pi    97 Sep 18  2024 log2ram
-rw-r--r-- 1 root root 186 Jun 19  2023 minidlna
-rw-r--r-- 1 root root 101 Jul 16  2019 mpd
-rw-r--r-- 1 root root 329 Mar 14  2023 nginx
-rw-r--r-- 1 root root 215 Nov 25 12:21 php8.2-fpm
-rw-r--r-- 1 root root  94 Apr 11  2022 ppp
-rw-r--r-- 1 root root 875 Oct 10  2023 samba
-rw-r--r-- 1 root root 353 Oct 10  2023 winbind
-rw-r--r-- 1 root root 145 Oct 14  2019 wtmp

I'll investigate why the user:group is pi:pi instead of root:root and fix it but that log rotate error shouldn't have anything to do with the log2ram service.


RE: logrotate: log2ram permission problem - TheOldPresbyope - 04-11-2025

(04-11-2025, 06:01 PM)Tim Curtis Wrote: Nvm.

This is prolly the cause of the logrotate error.
Code:
pi@moode9scn:~ $ ls -l /etc/logrotate.d/
total 52
-rw-r--r-- 1 root root 120 Feb 14  2023 alternatives
-rw-r--r-- 1 root root 173 May 25  2023 apt
-rw-r--r-- 1 root root 130 Oct 14  2019 btmp
-rw-r--r-- 1 root root 112 Feb 14  2023 dpkg
-rw-r--r-- 1 pi   pi    97 Sep 18  2024 log2ram
-rw-r--r-- 1 root root 186 Jun 19  2023 minidlna
-rw-r--r-- 1 root root 101 Jul 16  2019 mpd
-rw-r--r-- 1 root root 329 Mar 14  2023 nginx
-rw-r--r-- 1 root root 215 Nov 25 12:21 php8.2-fpm
-rw-r--r-- 1 root root  94 Apr 11  2022 ppp
-rw-r--r-- 1 root root 875 Oct 10  2023 samba
-rw-r--r-- 1 root root 353 Oct 10  2023 winbind
-rw-r--r-- 1 root root 145 Oct 14  2019 wtmp

I'll investigate why the user:group is pi:pi instead of root:root and fix it but that log rotate error shouldn't have anything to do with the log2ram service.

Erm. We find in /etc/logrotate.d the file log2ram so, yes, the logrotate service will touch the log2ram log. Now that I know to look, I see the OP's error in the journals of the two players currently powered up here.

Incidentally, there seem to be some other, unrelated errors in that directory.

Cases in point, 

- file /etc/logrotate.d/mpd refers to files /var/log/mpd/*.log which won't pick up the actual mpd log file /var/log/mpd/log.

- file ppp refers to file /var/log/ppp- connect-errors. Should these be "php" or are we really referring to the old point to point protocol used with dial-up modems?

I haven't looked carefully at logrotate to see where permissions matter.

Regards,
Kent


RE: logrotate: log2ram permission problem - dheijl - 04-11-2025

> I'll investigate why the user:group is pi:pi instead of root:root and fix it but that log rotate error shouldn't have anything to do with the log2ram service.

I noticed that /var/log/journal was filling up with logfiles, that's why I ran "journalctl" and noticed that line.

I attach the journalctl output.


RE: logrotate: log2ram permission problem - Tim Curtis - 04-11-2025

lol, indeed thats the old ppp connection protocol

Here are the fixes
Code:
sudo chown root:root /etc/logrotate.d/log2ram
sudo sed -i 's/*.log/log/' /etc/logrotate.d/mpd



RE: logrotate: log2ram permission problem - dheijl - 04-12-2025

Applied, thanks!