How to log vsftpd to syslog ?

Installing, Configuring, Troubleshooting server daemons such as Web and Mail
Post Reply
taolei
Posts: 116
Joined: 2007/05/01 02:47:32

How to log vsftpd to syslog ?

Post by taolei » 2009/01/11 06:12:56

Hello.

I open "man vsftpd.conf", it says
=================================================================
syslog_enable
If enabled, then any log output which would have
gone to /var/log/vsftpd.log goes to the system log
instead. Logging is done under the FTPD facility.

Default: NO
=================================================================

So I add "syslog_enable=YES" to the /etc/vsftpd.conf, and add "ftpd.* /var/log/ftplog" into /etc/syslog.conf.
But there is no log infomation in the ftplog file.

geewhiz
Posts: 85
Joined: 2008/12/20 20:58:48
Location: Canada
Contact:

Re: How to log vsftpd to syslog ?

Post by geewhiz » 2009/01/11 13:43:44

Sorry, misread the last part of your post (too early in morning), your syslog.conf mod looks OK.

After changing syslog.conf, you will need to restart syslogd to create any new log files.

taolei
Posts: 116
Joined: 2007/05/01 02:47:32

Re: How to log vsftpd to syslog ?

Post by taolei » 2009/01/12 01:06:36

Hello, geewhiz.

I have restarted syslogd, but /var/log/ftplog is always empty.

However, I found there were many vsftp logs in /var/log/messages.

Besides, in "man syslog.conf", I cannot see the "ftpd" or "ftp" facility, only "mail", "news", "lpr" and so on.

Is the reason of this problem that syslogd doesnot recognize "ftpd" facility so it redirects all ftp logs into /var/log/messages ?

NedSlider
Forum Moderator
Posts: 2890
Joined: 2005/10/28 13:11:50
Location: UK

Re: How to log vsftpd to syslog ?

Post by NedSlider » 2009/01/12 10:20:09

[quote]
taolei wrote:
Hello.

I open "man vsftpd.conf", it says
=================================================================
syslog_enable
If enabled, then any log output which would have
gone to /var/log/vsftpd.log goes to the system log
instead. Logging is done under the FTPD facility.

Default: NO
=================================================================

[/quote]

Silly question maybe, but why don't you just leave this at the default and have it log to /var/log/vsftpd.log as is the default?

Or am I missing something?

taolei
Posts: 116
Joined: 2007/05/01 02:47:32

Re: How to log vsftpd to syslog ?

Post by taolei » 2009/01/12 11:48:04

[quote]
NedSlider wrote:

Silly question maybe,[/quote]

Maybe. It doesn't mater.


[quote]
NedSlider wrote:

but why don't you just leave this at the default and have it log to /var/log/vsftpd.log as is the default?

Or am I missing something?[/quote]

I only want to have it work properly with syslog, since it provides another choice other than the default one.

NedSlider
Forum Moderator
Posts: 2890
Joined: 2005/10/28 13:11:50
Location: UK

Re: How to log vsftpd to syslog ?

Post by NedSlider » 2009/01/12 12:47:24

[quote]
taolei wrote:

I only want to have it work properly with syslog, since it provides another choice other than the default one.[/quote]

Sorry, perhaps I don't understand.

By default, vsftp will log to /var/log/vsftpd.log

But you are trying to get it to log via syslog (default of /var/log/messages) but then configure syslog to log it to /var/log/ftplog which was (almost) the default in the first place :-?

Did I miss something or are you trying to go around in circles?

taolei
Posts: 116
Joined: 2007/05/01 02:47:32

Re: How to log vsftpd to syslog ?

Post by taolei » 2009/01/12 13:20:54

Hello, NedSlider.

Maybe my previous posts are unclear.

Yes, I am just trying to get it to log via syslog.

There 2 reasons:
  Firstly, I just want to do an experiment and to see how it work with syslog. (The result is in my first post)
  Secondly, I want to use syslog to make a central control of loggings --- News, Mail, FTP all log via syslog.

:-)

liu_emo17
Posts: 1
Joined: 2009/11/27 06:53:20

Re: How to log vsftpd to syslog ?

Post by liu_emo17 » 2009/11/27 07:01:47

1. /etc/vsftpd.conf
syslog_enable=YES

2. /etc/syslog.conf
ftp.* /var/log/ftp.log[quote]
taolei wrote:
Hello.

Post Reply

Return to “CentOS 5 - Server Support”