Chinaunix首页 | 论坛 | 博客
  • 博客访问: 424705
  • 博文数量: 161
  • 博客积分: 5005
  • 博客等级: 上校
  • 技术积分: 1090
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-20 16:38
文章分类

全部博文(161)

文章存档

2011年(21)

2010年(33)

2009年(89)

2008年(18)

我的朋友

分类: LINUX

2009-05-22 21:15:27

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
阅读(7929) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~