1

vsftpd的日志设置

 2 years ago
source link: https://zhangrr.github.io/posts/20211025-vsftpd/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Vsftpd的日志设置

2021-10-25 1 分钟阅读

为了研发方便就给他们在内网开通了 vsftpd 的服务。

结果 java 直接有封好的 ftp library 可用,大家就直接用了。

导致任何单独的一个文件上传都会起一个 ftp 实例,没有复用 ftp 的 socket 链接 。系统挤压了大量的socket连接。

烦恼啊,出了事就麻烦。需要把日志都详细记下来

做法如下:

vi /etc/vsftp/vsftpd.conf
......
dual_log_enable=YES
log_ftp_protocol=YES
xferlog_enable=YES
xferlog_std_format=NO
......

解释一下:

  • dual_log_enable — 和 xferlog_enable 协同,会写两份日志,一份到/var/log/xferlog,一份到/var/log/vsftpd.log

  • log_ftp_protocol — 和 xferlog_enable 协同,同时xferlog_std_format需要设置为NO,这样所有的 FTP 命令都会记录下来。

这样所有人的操作都会被记录下来,就后顾无忧了。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK