Koozali.org: home of the SME Server
Obsolete Releases => SME Server 9.x => Topic started by: rmoria on January 25, 2018, 01:05:16 PM
-
Hi,
I am using FTP from a webcam to transfer snapshots to my server. The problem is that it doesnt keep the connection open en opens a new one every time I upload a file (every 5 seconds). All ftp connections are logged in messages, so it is filled with those.
Is there any way to stop ftp from logging or a way to remove them from messages ?
-
proftpd send this to syslog. Depending on the line, one can configure syslog to send this to a different file.
Can you post here an example of the line in your message log ?
-
Sure, here is a small snip
Jan 25 20:15:56 nathan proftpd[3794]: 10.0.0.1 (10.0.0.229[10.0.0.229]) - FTP session opened.
Jan 25 20:15:56 nathan proftpd[3794]: 10.0.0.1 (10.0.0.229[10.0.0.229]) - Preparing to chroot to directory '/home/e-smith/files/users/XXXXXX/home'
Jan 25 20:15:56 nathan proftpd[3794]: 10.0.0.1 (10.0.0.229[10.0.0.229]) - FTP session closed.
Jan 25 20:16:06 nathan proftpd[3865]: 10.0.0.1 (10.0.0.229[10.0.0.229]) - FTP session opened.
Jan 25 20:16:06 nathan proftpd[3865]: 10.0.0.1 (10.0.0.229[10.0.0.229]) - Preparing to chroot to directory '/home/e-smith/files/users/XXXXXX/home'
Jan 25 20:16:06 nathan proftpd[3865]: 10.0.0.1 (10.0.0.229[10.0.0.229]) - FTP session closed.
(I changed the upload time to 10 seconds)
-
Then you can create a custom template for /etc/rsyslog.conf in order to redirect proftpd logs to another file.
It hasto be prior to the line for messages log. Should be something like this:
proftpd /var/log/proftpd/proftpd.conf
Then you need to create the folder and file with correct permissions.
Then you need to create a logrotate rule in /etc/logrotate.d/. You can check files there to create your own on the same way, or refer to the man page.