proftpd logs not rotated

donco

Verified User
Joined
Feb 5, 2004
Messages
45
Noted that we have some fairly large proftpd log files:
Code:
# ll /var/log/proftpd/
-rw-r--r--    1 root     root     56596483 Aug  7 22:45 access.log
-rw-r--r--    1 root     root     31974855 Aug  7 22:45 auth.log
-rw-r--r--    1 root     root     57130081 Aug  7 22:45 xferlog.legacy
(omitted per IP byte logs as they appear to be rotated)

Further investigation showed that the logrotate def was broken/ineffectual:
Code:
# cat /etc/logrotate.d/proftpd 
/var/log/xferlog {
        missingok
        notifempty
        postrotate
                /usr/bin/kill -HUP `cat /var/run/proftpd.pid 2>/dev/null` 2>/dev/null || true
        endscript
}
I would think that the logorate def is broken and should actually refer to /var/log/proftpd/*.log /var/log/proftpd/xferlog.legacy. Please confirm whether this is a bug and the preferred solution. We would like to rotate these logs before they get too much bigger. :)

Note, also, that it would be much more elegant if DA was configured to have proftpd output all logs to be rotated with logrotate with a .log extension, as then a single wildcard could be used.

Regards,
-the donco
 
Same here

I've got the same problem with my logs.

Proftpd are pretty huge (we have multiple ftp connection through the all day) and my file is constantly growing (actual 10 Mg high)...

I don't know if this is bug in da log file rotating, but i'd like to know if there is a solution, for this, as i'd like to retrieve logs regurlaly for analysis, and 9 meg is a bit large...

Thks for your help...

Tdldp
 
Time too

In addition to log rotation for proftpd,
i've noticed a bug in timestamp on the proftpd access log...
When all my logs are noted with gmt + 2hr, this one is noted gmt only...

Is this a bug, or is it because i'm newbie, and don't know where to search how i can set timestamp to gmt + 2hr for this specific log....


Thks for your help
 
Hello,

Ok, I've added a fix in the proftpd.sh script for new installs.

You'll want to change your /etc/logrotate.d/proftpd file to look like:
Code:
/var/log/proftpd/access.log /var/log/proftpd/auth.log /var/log/proftpd/xferlog.legacy {
        missingok
        notifempty
        postrotate
                /usr/bin/kill -HUP `cat /var/run/proftpd.pid 2>/dev/null` 2>/dev/null || true
        endscript
}
John
 
Back
Top