I am not sure how to correctly troubleshoot this. I just noticed that my /var/log/xferlog file is huge. There are no files in /etc/logrotate.d/ for xferlog. This is what leads me to believe that it isnot rotating. Or perhaps I do not have it set to rotate. I am not sure.
I am running CentOS release 5 (Final). Can someone tell me what I, apparently, do not have configured correctly. Thank you.
PATI MOSS System Engineer Sr. Professional CSC
It's a bit funny that logrotate is difficult to fix for you... considering you have "System Engineer Sr. Professional" in your signature...
/var/log/xferlog { missingok notifempty compress rotate 5 size 1024k yearly create 0600 root root }
Modify to suit your needs.
On Fri, May 20, 2011 at 9:25 AM, Patricia A Moss pmoss4@csc.com wrote:
I am not sure how to correctly troubleshoot this. I just noticed that my /var/log/xferlog file is huge. There are no files in /etc/logrotate.d/ for xferlog. This is what leads me to believe that it isnot rotating. Or perhaps I do not have it set to rotate. I am not sure.
I am running CentOS release 5 (Final). Can someone tell me what I, apparently, do not have configured correctly. Thank you.
PATI MOSS System Engineer Sr. Professional CSC
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Fri, May 20, 2011 at 10:44:49AM -0400, Steven Crothers wrote:
It's a bit funny that logrotate is difficult to fix for you... considering you have "System Engineer Sr. Professional" in your signature...
This gave me a chuckle. :) Ah, the advantage of being a consultant or working at a tiny company where you can assign your own titles!
Ray
Ray Van Dolson wrote:
On Fri, May 20, 2011 at 10:44:49AM -0400, Steven Crothers wrote:
It's a bit funny that logrotate is difficult to fix for you... considering you have "System Engineer Sr. Professional" in your signature...
This gave me a chuckle. :) Ah, the advantage of being a consultant or working at a tiny company where you can assign your own titles!
Or the company HR assigns titles, for other reasons. My very first programming job - I hadn't finished my 2 yr degree, but I'd done all the programming courses, gave me "sr. programmer I". A few months after I was hired, I asked my buddy, the systems programmer (m'frame shop, long ago), why I wasn't a jr. one, and he told me they'd gotten rid of all jr programmer titles a couple years before, since they were eligible to join the union.
We, of course, don't need no steenkin' unions, nor 40 hr weeks, nor....
mark
On Fri, 20 May 2011, Ray Van Dolson wrote:
This gave me a chuckle. :) Ah, the advantage of being a consultant or working at a tiny company where you can assign your own titles!
At the Oregon Graduate Institute, a professor had a nice sign on one of the labs in the electrical engineering building: "Perpetual Motion and Time Travel." It was very funny to watch visitors process that, occasionally taking it a bit too seriously.
On Friday, May 20, 2011 10:43:10 AM Ray Van Dolson wrote:
On Fri, May 20, 2011 at 10:44:49AM -0400, Steven Crothers wrote:
It's a bit funny that logrotate is difficult to fix for you... considering you have "System Engineer Sr. Professional" in your signature...
This gave me a chuckle. :) Ah, the advantage of being a consultant or working at a tiny company where you can assign your own titles!
The company in question is not small.
As logrotate under linux is somewhat niche, it is not surprising that an otherwise very experienced person may not be familiar with it. That and the fact the the logrotate script to rotate the vsftpd.log is....
Wait a cotton-picking minute. Why is vsftpd writing to /var/log/xferlog in the first place, and not /var/log/vsftpd.log?
I have one machine on CentOS 4.9, and it exhibits a similar symptom. In /etc/vsftpd/vsftpd.conf, the following lines appear: # You may override where the log file goes if you like. The default is shown # below. #xferlog_file=/var/log/vsftpd.log #
But I see the logging in /var/log/xferlog, and in fact on this system (which is taking 35-40 ftp transfers per minute from weather station software for five weather stations, along with a seismometer and some other instruments) there is no /var/log/vsftpd.log file.
So there is an error in the configuration of the vsftpd package on CentOS 4.9 (and I presume on upstream EL4.9) that sends the log to the wrong file, and doesn't set up to rotate xferlog.
Now, one of my C5.6 boxen is set up with /etc/vsftpd/vsftpd.conf: # The name of log file when xferlog_enable=YES and xferlog_std_format=YES # WARNING - changing this filename affects /etc/logrotate.d/vsftpd.log #xferlog_file=/var/log/xferlog # which matches observed behavior.
But why didn't the packager change the name of the logrotate script? Furthermore, the packager even went as far as leaving the lines for vsftpd.log in place, and adding the xferlog stanza. Perhaps the packager should have made a symlink /etc/logrotate.d/xferlog pointing the the correct file as well?
Pati, to check to see if it's rotating the files at all, if you do an ls -l /var/log/xferlog* do you see something like: # ls -l /var/log/xferlog* -rw------- 1 root root 0 May 15 04:02 /var/log/xferlog -rw------- 1 root root 0 May 8 04:02 /var/log/xferlog.1 -rw------- 1 root root 0 May 1 04:02 /var/log/xferlog.2 -rw------- 1 root root 0 Apr 24 04:02 /var/log/xferlog.3 -rw------- 1 root root 0 Apr 17 04:02 /var/log/xferlog.4 # ? (yeah, this machine isn't heavily used for ftp; its the C4.9 box that gets loaded. And this is a good reminder for me to fix my own logrotate scripts on that box.... :-) ).
But to deride a person for not following the arcana of a confusingly named log file and with the package in a somewhat confusing state when it comes to the logrotate script's naming, among other things.... well, it's just not professional.
On 21.5.2011 19.02, Lamar Owen wrote:
Now, one of my C5.6 boxen is set up with /etc/vsftpd/vsftpd.conf: # The name of log file when xferlog_enable=YES and xferlog_std_format=YES # WARNING - changing this filename affects /etc/logrotate.d/vsftpd.log #xferlog_file=/var/log/xferlog # which matches observed behavior.
The important parameter in vsftpd.conf, if I read you right, is this: # Switches between logging into vsftpd_log_file and xferlog_file files. # NO writes to vsftpd_log_file, YES to xferlog_file xferlog_std_format=YES
That is where you choose the log file. What do you have for xferlog_std_format?
- Jussi
On Sat, 21 May 2011, Lamar Owen wrote:
Wait a cotton-picking minute. Why is vsftpd writing to /var/log/xferlog in the first place, and not /var/log/vsftpd.log?
early in the thread, it was clear from a reply's content that a locally installed 'ftpd' and not the CentOS vsftpd was being used
-- Russ herrold
On 21.5.2011 20.43, R P Herrold wrote:
early in the thread, it was clear from a reply's content that a locally installed 'ftpd' and not the CentOS vsftpd was being used
I think you are inadvertently confusing the issue. ftpd is mentioned in this file (see below), but still vsftpd is used:
[root@mx2 logrotate.d]# cat vsftpd.log /var/log/vsftpd.log { # ftpd doesn't handle SIGHUP properly nocompress missingok }
/var/log/xferlog { # ftpd doesn't handle SIGHUP properly nocompress missingok }
As for me, vsftpd is logging to xferlog, and it is rotated normally (CentOS 5.6) with the following settings in vsftpd.conf:
# The target log file can be vsftpd_log_file or xferlog_file. # This depends on setting xferlog_std_format parameter xferlog_enable=YES # Switches between logging into vsftpd_log_file and xferlog_file files. # NO writes to vsftpd_log_file, YES to xferlog_file xferlog_std_format=YES
- Jussi
On Saturday, May 21, 2011 01:43:10 PM R P Herrold wrote:
On Sat, 21 May 2011, Lamar Owen wrote:
Wait a cotton-picking minute. Why is vsftpd writing to /var/log/xferlog in the first place, and not /var/log/vsftpd.log?
early in the thread, it was clear from a reply's content that a locally installed 'ftpd' and not the CentOS vsftpd was being used
Looking... don't see that. Perhaps I'm just missing it.
Lamar Owen wrote on 05/21/2011 04:25 PM:
early in the thread, it was clear from a reply's content that
a locally installed 'ftpd' and not the CentOS vsftpd was being used
Looking... don't see that. Perhaps I'm just missing it.
Same here. The OP only replied once, and had the same default contents in /etc/logrotate.d/vsftpd.log that I have.
Phil
Patricia A Moss wrote on 05/20/2011 09:25 AM:
I am not sure how to correctly troubleshoot this. I just noticed that my /var/log/xferlog file is huge. There are no files in /etc/logrotate.d/ for xferlog. This is what leads me to believe that it isnot rotating. Or perhaps I do not have it set to rotate. I am not sure.
I am running CentOS release 5 (Final).
The current release has "CentOS release 5.6 (Final)" in /etc/redhat-release. If you are running "5" then you may be seriously behind on updates.
Can someone tell me what I, apparently, do not have configured correctly. Thank you.
The configuration for xferlog is in /etc/logrotate.d/vsftpd.log:
/var/log/xferlog { # ftpd doesn't handle SIGHUP properly nocompress missingok }
What do you have?
Phil
The configuration for xferlog is in /etc/logrotate.d/vsftpd.log:
/var/log/xferlog { # ftpd doesn't handle SIGHUP properly nocompress missingok }
What do you have?
I have the same: /var/log/xferlog { # ftpd doesn't handle SIGHUP properly nocompress missingok }
PATI MOSS System Engineer Sr. Professional CSC
From: Phil Schaffner Philip.R.Schaffner@NASA.gov To: centos@centos.org Date: 05/20/2011 10:58 AM Subject: Re: [CentOS] xferlog not rotating.
Patricia A Moss wrote on 05/20/2011 09:25 AM:
I am not sure how to correctly troubleshoot this. I just noticed that my /var/log/xferlog file is huge. There are no files in /etc/logrotate.d/ for xferlog. This is what leads me to believe that it isnot rotating. Or perhaps I do not have it set to rotate. I am not sure.
I am running CentOS release 5 (Final).
The current release has "CentOS release 5.6 (Final)" in /etc/redhat-release. If you are running "5" then you may be seriously behind on updates.
Can someone tell me what I, apparently, do not have configured correctly. Thank you.
The configuration for xferlog is in /etc/logrotate.d/vsftpd.log:
/var/log/xferlog { # ftpd doesn't handle SIGHUP properly nocompress missingok }
What do you have?
Phil _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Patricia A Moss wrote:
I am not sure how to correctly troubleshoot this. I just noticed that my /var/log/xferlog file is huge. There are no files in /etc/logrotate.d/ for xferlog. This is what leads me to believe that it isnot rotating. Or perhaps I do not have it set to rotate. I am not sure.
I am running CentOS release 5 (Final). Can someone tell me what I, apparently, do not have configured correctly. Thank you.
Ok, I just did a little searching, and the installs of various packages *should* put things in /etc/logrotate.d. I trust you have backups: you should look to see if the contents of that directory were somehow deleted, and restore them. If not, copy them from another machine.
And find out why they disappeared.
mark