vsftp配置和注释

软件包:vsftpd-1.1.3-8.i386.rpm   在实验中软件包位于redhat 9.0第三张光盘里
安装后默认生成文件
1./etc/vsftpd.user_list
2./etc/vsftpd.ftpusers
3./etc/vsftpd/vsftpd.conf
注意事项
1.ftp和nobody帐号必须存在,目录权限不能为777,否则匿名用户将无法登陆
2.匿名帐号默认访问的路径是/var/ftp/pub
3.实现添加的帐号只用于登陆ftp,而不能登陆系统(虚拟用户):useradd  -g ftp -s /sbin/nologin USER_ID
4.使arronax用户只能在自己的目录内活动:
   #touch /etc/vsftpd.chroot_list  把arronax帐号添加进去
   然后改/etc/vsftpd/vsftpd.conf文件,找如下的两行
   #chroot_list_enable=YES
   #chroot_list_file=/etc/vsftpd.chroot_list
   把前面的#号去掉
   重启vsFTPD服务器

配置文件及相关参数说明(默认允许匿名登录,如要使其他用户登陆只要到用户列表总注释掉)
# Example config file /etc/vsftpd.conf
#
# The default compiled in settings are very paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
#
# Allow anonymous FTP?
anonymous_enable=YES                      允许匿名登陆
#
# Uncomment this to allow local users to log in.
local_enable=YES                      允许本地用户登录
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES                      允许任何形式的ftp写命令
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
local_umask=022                      FTP上本地的文件权限
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
#anon_upload_enable=YES                      开启匿名FTP服务器上传权限#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=YES                      开启匿名FTP服务器创建和写权限
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES                      激活目录信息
#
# Activate logging of uploads/downloads.
xferlog_enable=YES                      激活上传和下传的日志
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES                      启用FTP数据端口的数据连接
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#chown_uploads=YES                      让用户有改变文件权限的权限
#chown_username=whoever                      用户#
# You may override where the log file goes if you like. The default is shown
# below.
#xferlog_file=/var/log/vsftpd.log                      指定log记录文件的位置和名字
#
# If you want, you can have your log file in standard ftpd xferlog format
xferlog_std_format=YES                      使用标准的日志格式
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600                      设定默认的空闲超时时间
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120                      设定默认的数据连接超时时间
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure                      指定一个可以让服务器用作完全隔离和没有特权的独立用户
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#async_abor_enable=YES                      开启支持早期FTP客户端
#
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode.
# Beware that turning on ascii_download_enable enables malicious remote parties
# to consume your I/O resources, by issuing the command "SIZE /big/file" in
# ASCII mode.
# These ASCII options are split into upload and download because you may wish
# to enable ASCII uploads (to prevent uploaded scripts etc. from breaking),
# without the DoS risk of SIZE and ASCII downloads. ASCII mangling should be
# on the client anyway..
#ascii_upload_enable=YES                      实现ASCII模式的传输
#ascii_download_enable=YES                      
#
# You may fully customise the login banner string:
#ftpd_banner=Welcome to blah FTP service.                      自定义登录的标志信息
#
# You may specify a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
#deny_email_enable=YES                      指定一个非法匿名邮件地址列表的文件
# (default follows)
#banned_email_file=/etc/vsftpd.banned_emails
#
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
#chroot_list_enable=YES                      用一个列表限定哪些本地用户只能在自己目录下活动
# (default follows)
#chroot_list_file=/etc/vsftpd.chroot_list
#
# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it.
#ls_recurse_enable=YES                      

pam_service_name=vsftpd                      
userlist_enable=YES                      用userlistlai 来限制用户访问
#enable for standalone mode
listen=YES                      
tcp_wrappers=YES                      

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/370491/viewspace-216953/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/370491/viewspace-216953/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值