1)建立文件/var/log/pureftpd.log
2)修改/etc/syslog.conf
1>在这行的cron.none后面添加 ;ftp.none 使ftp的日志信息成私有
*.info;mail.none;authpriv.none;cron.none /var/log/messages
为
*.info;mail.none;authpriv.none;cron.none;ftp.none /var/log/messages
2>在/etc/syslog.conf文件最后加上
#pureftp日志
ftp.* -/var/log/pureftpd.log
注意: 不要去掉/var前面的-号,否则日志会在/var/log/messages与/var/log/purefpd.log里各记录一份. 添加了-号,就只会记录在/var/log/purefptd.log内
3)使/etc/syslog.conf生效
[test@ ]# killall -HUP syslogd
到现在设置完毕,重启下pure-ftpd,现在在客户端登陆ftp试下
=============[附我的syslog.conf]==========================
# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.* /dev/console
# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none;ftp.none /var/log/messages
# The authpriv file has restricted access.
authpriv.* /var/log/secure
# Log all the mail messages in one place.
mail.* -/var/log/maillog
# Log cron stuff
cron.* /var/log/cron
# Everybody gets emergency messages
*.emerg *
# Save news errors of level crit and higher in a special file.
uucp,news.crit /var/log/spooler
# Save boot messages also to boot.log
local7.* /var/log/boot.log
#pureftp日志
ftp.* -/var/log/pureftpd.log