Bug 218260 - vsftpd logs do not rotate by default.
vsftpd logs do not rotate by default.
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: vsftpd (Show other bugs)
6
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Maros Barabas
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-12-04 03:26 EST by Chien-Chung Yeh
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-07-10 10:24:44 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Chien-Chung Yeh 2006-12-04 03:26:37 EST
Description of problem:
vsftpd logs do not rotate by default. (Due to Entry "xferlog_std_format=YES" in config 
file "/etc/vsftpd/vsftpd.conf" will force vsftpd to log into  /var/log/xferlog ,instead 
of  /var/log/vsftpd.log)

The bug have been fixed in RHEL, but _NOT_ Fedora Core.
Please refer to Bugzilla: #129941

Version-Release number of selected component (if applicable):
2.0.5-8

How reproducible:
Always

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Modify file "/etc/logrotate.d/vsftpd.log" :

--- /etc/logrotate.d/vsftpd.log.00      2006-12-04 16:23:57.000000000 +0800
+++ /etc/logrotate.d/vsftpd.log 2006-12-04 16:23:45.000000000 +0800
@@ -1,4 +1,4 @@
-/var/log/vsftpd.log {
+/var/log/xferlog {
     monthly
     # ftpd doesn't handle SIGHUP properly
     nocompress
Comment 1 Nerijus Baliūnas 2007-06-19 06:11:57 EDT
Yes, due to Entry "xferlog_std_format=YES" in config file
/etc/vsftpd/vsftpd.conf" will force vsftpd to log into /var/log/xferlog, instead
of /var/log/vsftpd.log.
So either of these should be done:
1. Log to /var/log/vsftpd.log. Then #xferlog_file=/var/log/vsftpd.log line in
vsftpd.conf should be uncommented by default.
2. Log to /var/log/xferlog. Then /etc/logrotate.d/vsftpd.log should be changed
as per above comment.

In either case a comment should be added in vsftpd.conf above
xferlog_std_format=YES line:

# If you want, you can have your log file in standard ftpd xferlog format
# Note that default logging location is changed to /var/log/xferlog in this case.
xferlog_std_format=YES
Comment 2 Maros Barabas 2007-06-19 07:48:27 EDT
Hi,

There is one possible solution: Make value of xferlog_std_format to be "NO" as
default configuration. Is this what you want ?

Thanks
Comment 3 Nerijus Baliūnas 2007-06-19 08:20:16 EDT
Yes, it's one of the solutions, but I actually like xferlog format more. If I
could choose, I would choose item 1 above. In any case (even if
xferlog_std_format is made NO) the comment should be added. I asked upstream to
apply the following patch:

--- vsftpd.conf.orig    2005-05-21 01:52:54.000000000 +0300
+++ vsftpd.conf 2007-06-19 15:15:03.196843999 +0300
@@ -50,7 +50,8 @@
 # below.
 #xferlog_file=/var/log/vsftpd.log
 #
-# If you want, you can have your log file in standard ftpd xferlog format
+# If you want, you can have your log file in standard ftpd xferlog format.
+# Note that the default log file location is /var/log/xferlog in this case.
 #xferlog_std_format=YES
 #
 # You may change the default value for timing out an idle session.

You may want to apply it locally until upstream incorporates it.
Comment 4 Maros Barabas 2007-07-10 10:24:44 EDT
Upstream doesn't answer to my emails. I added this comment to default
vsftpd.conf to devel version (vsftpd-2.0.5-18.F8). I don't consider this bug so
important to make changes in FC6. Thanks for patch
Comment 5 Nerijus Baliūnas 2007-07-11 07:47:55 EDT
Upstream must have added a comment only, because they don't have
xferlog_std_format=YES by default. As we have, xferlog_file=/var/log/vsftpd.log
should also be uncommented by default according to Comment #1 1. And this change
should probably be backported to F7 too, as now log files are not rotated and
keep growing.

Note You need to log in before you can comment on or make changes to this bug.