---
title: "Linux下VSFTP配置全攻略"
author: "lkf009"
date: "2011-12-28T18:49:35Z"
tags: []
categories: ["操作系统"]
slug: "linux-vsftp"
draft: false
lastmod: "2011-12-28T18:49:35Z"
id: 1328897
url: "https://lkf009.iteye.com/blog/1328897"
---

vsftp配置指南  
1.相关配置文件  
/etc目录下的vsftpd.conf,vsftpd.ftpuser,vsftpd.user\_list,/etc/xinetd.d/vsftpd  
2.配置vsftp  
主要是修改/etc/vsftpd.conf就可以了,相关参数如下:  
anonymous\_enable=YES 是否允许匿名ftp,如否则选择NO  
local\_enable=YES 是否允许本地用户登录 

local\_umask=022 默认的umask码  
anon\_upload\_enable=YES 是否允许匿名ftp用户访问  
anon\_upload\_enable=YES 是否允许匿名上传文件  
anon\_mkdir\_write\_enable=YES 是否允许匿名用户有创建目录的权利  
dirmessage\_enable=YES 是否显示目录说明文件,默认是YES但需要收工创建.message文件  
xferlog\_enable=YES 是否记录ftp传输过程  
connect\_from\_port\_20=YES 是否确信端口传输来自20(ftp-data)  
chown\_upload=YES  
chown\_username=username 是否改变上传文件的属主,如果是需要输入一个系统用户名,你可以把上传的文件都改成root属主  
xferlog\_file=/var/log/vsftpd.log ftp传输日志的路径和名字默认是/var/log/vsftpd.log  
xferlog\_std\_format=YES 是否使用标准的ftp xferlog模式  
idle\_session\_timeout=600 设置默认的断开不活跃session的时间  
data\_connection\_timeout=120 设置数据传输超时时间  
nopriv\_user=ftpsecure 运行vsftpd需要的非特权系统用户默认是nobody  
async\_abor\_enable=YES 是否允许运行特殊的ftp命令async ABOR.这里我翻译的不爽,原文如下:  
When enabled, a special FTP command known as "async ABOR" will be enabled. Only ill advised FTP clients will use this feature.Addtionally, this feature is awkward to handle, so it is dis-abled by default. Unfortunately, some FTP clients will hang when cancelling a transfer unless this feature is available, so you may wish to enable it.  
ascii\_upload\_enable=YES  
ascii\_download\_enable=YES 是否使用ascii码方式上传和下载文件  
ftpd\_banner=Welcome to chenlf FTP service. 定制欢迎信息  
deny\_email\_enable=YES  
banned\_email\_file=/etc/vsftpd.banned\_emails 是否允许禁止匿名用户使用某些邮件地址,如果是输入禁止的邮件地址的路径和文件名  
chroot\_list\_enable=YES  
chroot\_list\_file=/etc/vsftpd.chroot\_list 是否将系统用户限止在自己的home目录下,如果选择了yes那么chroot\_list\_file=/etc/vsftpd.chroot\_list中列出的是不chroot的用户的列表  
max\_clients=Number 如果以standalone模式起动,那么只有$Number个用户可以连接,其他的用户将得到错误信息,默认是0不限止  
message\_file 设置访问一个目录时获得的目录信息文件的文件名,默认是.message  
没发现有限止带宽的地方,如果谁知道请告诉我,详细的帮助说明请参考man vsftpd.conf  
本篇文章来源于 Linux公社网站([www.linuxidc.com](http://www.linuxidc.com))  原文链接：[http://www.linuxidc.com/Linux/2007-10/8062.htm](http://www.linuxidc.com/Linux/2007-10/8062.htm)