logrotate z-way-server has wrong file mode

Discussions about RaZberry - Z-Wave board for Raspberry computer
ibjr
Posts: 31
Joined: 05 May 2016 21:52

logrotate z-way-server has wrong file mode

Post by ibjr »

After installing R3.0.0 the log file var/log/z-way-server does not rotate anymore so the file keeps growing in size over time.
It turns out that the mode of file /etc/logrotate.d/z-way-server is 0664.
Logrotate requires file mode 0644 or 0444

Manually changing the file mode solves the problem, but maybe this can be included in the installation scripts?
micky1500
Posts: 298
Joined: 07 Feb 2016 16:29
Location: England

Re: logrotate z-way-server has wrong file mode

Post by micky1500 »

I knew it was broken, as I had a file exceeding 900MB

sudo chmod 0644 /etc/logrotate.d/z-way-server

Thankyou to ibjr
Raspi 4 - (Buster - 32 Bit) Zwave Version 4.1.1, Raz 7 Pro, Serial API Version: 07.38
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: logrotate z-way-server has wrong file mode

Post by PoltoS »

Thanks for the tip. Will become part of 3.0.1
himac
Posts: 4
Joined: 25 Oct 2019 08:37

Re: logrotate z-way-server has wrong file mode

Post by himac »

PoltoS wrote:
16 Sep 2019 23:18
Thanks for the tip. Will become part of 3.0.1
Hi, it is still not working in 3.0.1
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: logrotate z-way-server has wrong file mode

Post by PoltoS »

Looks like. 3.0.2 then ;) soon
micky1500
Posts: 298
Joined: 07 Feb 2016 16:29
Location: England

Re: logrotate z-way-server has wrong file mode

Post by micky1500 »

After upgrading to 3.0.6 using web UI
logfile is not rotating and getting large >300MB
same issue as before
after 3.0.6 -rw-rw-r-- 1 root root 231 Apr 28 02:03 z-way-server 01/05/2020
ran chmod, now -rw-r--r-- 1 root root 231 Apr 28 02:03 z-way-server

sudo chmod 0644 /etc/logrotate.d/z-way-server
Raspi 4 - (Buster - 32 Bit) Zwave Version 4.1.1, Raz 7 Pro, Serial API Version: 07.38
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: logrotate z-way-server has wrong file mode

Post by PoltoS »

Group write access affects logrotate?
micky1500
Posts: 298
Joined: 07 Feb 2016 16:29
Location: England

Re: logrotate z-way-server has wrong file mode

Post by micky1500 »

seems so, it wasn't working since 3.0.6
I did the old fix, sudo chmod 0644 /etc/logrotate.d/z-way-server
now its working.
Raspi 4 - (Buster - 32 Bit) Zwave Version 4.1.1, Raz 7 Pro, Serial API Version: 07.38
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: logrotate z-way-server has wrong file mode

Post by PoltoS »

Hm.. deb package postinst file contains chmod 644 /etc/logrotate.d/z-way-server.... Since v3.0.2
micky1500
Posts: 298
Joined: 07 Feb 2016 16:29
Location: England

Re: logrotate z-way-server has wrong file mode

Post by micky1500 »

I just looked in z-way-3.0.6_armhf.deb (downloaded on 28th April 2020) Extracting with 7-Zip
Found the file. C:\Z-Wave\Firmware\z-way-3.0.6_armhf.deb\data.tar\.\etc\logrotate.d\z-way-server
and the 'mode' column shows it with permissions -rw-rw-r--

All other files in the PI4 logrotate folder are set with permissions -rw-r--r-- (644)
and they work.
Raspi 4 - (Buster - 32 Bit) Zwave Version 4.1.1, Raz 7 Pro, Serial API Version: 07.38
Post Reply