Submitted by iuahost on Tue, 04/21/2020 - 05:45 Pro Licensee
Hello I trying to resolve issue with system logging, fresh install on Debian 9, all working perfect except system logging. In virtualhost or in modsec_audit logs I see system logs etc ... Apache logs looks like is ok, but virtualhost logs permissions are mess. Before rotation is virtual-server-name:www-data and after rotation is www-data:www-data, after mannually changing to virtual-server-name:www-data become www-data:www-data after new log rotation. I have checked Log File Rotation settings, from beginning (installation) log rotation for virtual server are www-data:www-data. Little help please, what is correct permissions for system logs, virtualhost (how to set it correct in Log File Rotation) etc. Thank you in advance
Status:
Needs work
Comments
Hi,
Thanks for contacting us.
It seems that you made some manual changes? Double check that rotated logs in System/Log File Rotation/Edit Log File and its option Re-create log file after rotation? set to Default (Yes, with old permissions). You could also use custom mode and force logrotate to use specific mode.
By the way, this tracker for premium support only. You are welcome to use our brand new Community Forums, which we keep an eye on as well.
Submitted by iuahost on Sun, 04/26/2020 - 04:05 Pro Licensee Comment #2
Hi, I already have tried make changes in "System/Log File Rotation/Edit Log Files", manually changing permissions ... recreated logs separate for every virtual server & subserver (domains/subdomains). System logs, delete and add again virtual server .... I have tried to change ErroRLogFormat/LogFormat in apache2 conf, tried reinstall Virtualmin on Debian 9 fresh, then on Debian 9 with "minimal" ... All in the same point - nothing changes, so probably this is the "bug" .... Or maybe this because one domain have "laravel" website running ... Issue like this I have first time ...
By the way, I own licence x 250 domain, please cherck my account and by the way i never ask for for support, if I have issue, what I can resolve myself. Thank you in advance
Sorry about that. Usually there is a star on the UI, near the Pro username but for some reason, it's not displayed in your case.
What are the outputs of the following commands:
cat /etc/logrotate.conf
cat /etc/logrotate.d/*
As a work-around, you could run the command after log rotation is done, to change permissions:
Submitted by iuahost on Wed, 04/29/2020 - 04:16 Pro Licensee Comment #4
Hello Ilia, With website logs I have resolved issue, but here I need some help:
see "man logrotate" for details rotate log files weeklyweekly
keep 4 weeks worth of backlogsrotate 4
create new (empty) log files after rotating old onescreate
uncomment this if you want your log files compressed compress packages drop log rotation information into this directoryinclude /etc/logrotate.d
no packages own wtmp, or btmp -- we'll rotate them here/var/log/wtmp { missingok monthly create 0664 root utmp rotate 1 }
/var/log/btmp { missingok monthly create 0660 root utmp rotate 1 }
system-specific logs may be configured here/var/log/procmail.log { rotate 5 daily compress }
( I mean missing lines) Thank you