Bug 218260 - vsftpd logs do not rotate by default.
Summary: vsftpd logs do not rotate by default.
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: vsftpd
Version: 6
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Maros Barabas
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-12-04 08:26 UTC by Chien-Chung Yeh
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-07-10 14:24:44 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Chien-Chung Yeh 2006-12-04 08:26:37 UTC
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 10:11:57 UTC
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 11:48:27 UTC
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 12:20:16 UTC
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 14:24:44 UTC
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 11:47:55 UTC
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.