I am running EmonCMS locally on DietPi and am finding the log file permissions keep getting changed. I am using the standard setup for DietPi logs (so rotate each hour) and I wonder if as part of that process the permissions are being changed?
Just trying to confirm this is the likely cause of this oddity.
Does logrotate write to a log file?
Log file permissions being changed
Re: Log file permissions being changed
Jep logrotate writers to the files/rotate old and create new with new user and permissions in case.
You can adjust which user and permissions are used within /etc/logrotate.d/<modulr>.
I found that as an issue by times as well, e.g. in combination with mysql, apache or redis logs.
By default DietPi uses no logrotate but non-persistent RAMlog. But I guess you switched to persistent rsyslog+logrotate handling, then DietPi does not interfer.
You can adjust which user and permissions are used within /etc/logrotate.d/<modulr>.
I found that as an issue by times as well, e.g. in combination with mysql, apache or redis logs.
By default DietPi uses no logrotate but non-persistent RAMlog. But I guess you switched to persistent rsyslog+logrotate handling, then DietPi does not interfer.
Re: Log file permissions being changed
Hi,
Only change DietPi-RAMlog makes (required for our EmonCMS installation in dietpi-software):
https://github.com/Fourdee/DietPi/blob/ ... og#L52-L53
Although, this will not effect the user:group permission on file. Permissions set, are kept by DietPi-RAMlog and logclear.
Only change DietPi-RAMlog makes (required for our EmonCMS installation in dietpi-software):
https://github.com/Fourdee/DietPi/blob/ ... og#L52-L53
Although, this will not effect the user:group permission on file. Permissions set, are kept by DietPi-RAMlog and logclear.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Donating is the easiest – you can use PayPal or become a DietPi patron.