How to set up VSFTPD log to rotate once every day, and that those logs are to be kept for 30 days?
Why? Because traffic on server is HUGE, and logs get huge as well……
What has to be configured :
1. /etc/vsftpd/vsftpd.conf – set up type and location of logs. If this is working OK, no need to change anything.
2. /etc/logrotate.d/vsftpd and vsftpd.log, which need to be the same :
# ftpd doesn’t handle SIGHUP properly
This is how it should look if your log is named xfetlog, and is on location /var/log.
How to make vsftpd logs rotate on spot (this may take up to 1min, so be patient) :
# logrotate -f /etc/logrotate.d/vsftpd.log