免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1175 | 回复: 0

redhat 8.0下的vsftp的配置 [复制链接]

论坛徽章:
0
发表于 2009-11-15 16:29 |显示全部楼层

redhat 8.0下的vsftp的配置
作者:
[url=javascript:if(confirm('http://www.chinaunix.net/cgi-bin/bbs/profile.cgi?action=show&member=wind521  \n\n文件并未依 Teleport Pro 取回,因为 它的域或路径在项目排除特性被设置为排除 。  \n\n你要从服务器上打开它吗?'))window.location='http://www.chinaunix.net/cgi-bin/bbs/profile.cgi?action=show&member=wind521']wind521[/url]
     发表时间:2002/12/19 08:42am
RedHat带了wu-ftpd和vsftp两套ftp系统.我也使第一次接触vsftp,根据man说vsftp的含义就是Very Security Ftp的意思简单的看了看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
3 配置实例
以下是我的配置文件.允许匿名FTP,允许上传,chroot用户目录,上传文件属主改为root
anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=022
anon_upload_enable=YES
anon_mkdir_write_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
chown_uploads=YES
chown_username=root
xferlog_file=/var/log/vsftpd.log
xferlog_std_format=YES
pam_service_name=vsftpd
chroot_local_user=YES
4 起动服务
vsftpd和wu-ftpd不能同时起动,所以修改/etc/xinetd.d/wu-ftpd将disable设置为yes,然后修改/etc/vsftpd将disable设置为NO
执行/etc/initd.d/xinetd restart
转载

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/104034/showart_2094989.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP