Results 1 to 3 of 3
Hello,
I am running a vsftp server on my Linux system. Everything is fine, except that I find it difficult to maintain the log file at /var/ftp/vsftpd.log, as it is ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 06-23-2008 #1Just Joined!
- Join Date
- Jan 2007
- Posts
- 19
/var/log/vsftpd.log is growing
Hello,
I am running a vsftp server on my Linux system. Everything is fine, except that I find it difficult to maintain the log file at /var/ftp/vsftpd.log, as it is constantly growing. My requirement is to find a way to rotate the logs at regular intervals and send a mail to the root user, so that I can keep things clean and smooth.
I thought logrotate is the solution. There is a file 'vsftpd.log' in /etc/logrotate.d directory. But the contents of this file says:
-------------------------------------------------
/var/log/xferlog {
# ftpd doesn't handle SIGHUP properly
nocompress
missingok
}
-------------------------------------------------
As this looks more of a script than anything else, what are the other options?
And my /etc/logrotate.conf file has just the default values. Nothing extra for this vsftpd connection.
Here I am copy pasting only those lines that are relevant to 'logging' information in /etc/vsftpd/vsftpd.conf.
-------------------------------------------------
xferlog_enable=YES
xferlog_file=/var/log/vsftpd.log
xferlog_std_format=YES
-------------------------------------------------
Thanks,
Nivedhitha
- 06-23-2008 #2Linux Guru
- Join Date
- Nov 2007
- Posts
- 1,722
You might want to correct your config so that logrotate can manage your vsftpd log.
For example, you pasted the following confusing info:
maintain the log file at /var/ftp/vsftpd.logBut the logrotate config seems to be set up for this log file:xferlog_file=/var/log/vsftpd.log
/var/log/xferlog
- 06-23-2008 #3Just Joined!
- Join Date
- Jan 2007
- Posts
- 19
Hello,
Thanks for your quick reply. Yes, I see the confusion now
I also read the man pages of vsftpd.conf. Now I am going to edit the following three lines
-------------------------------------------------
xferlog_enable=YES
xferlog_file=/var/log/vsftpd.log
xferlog_std_format=YES
-------------------------------------------------
to the below three lines
-------------------------------------------------
xferlog_enable=YES
#xferlog_file=/var/log/vsftpd.log
#xferlog_std_format=YES
-------------------------------------------------
If I do this, am i letting /var/log/vsftpd.log to maintain my log information?
And if yes, how will logrotate and /var/log/vsftpd.log work together?
This is what I do not understand. Please clarify.
Thanks.


Reply With Quote
