北京金同方计算机培训,考试认证
当前位置:中招首页 -> IT培训 -> 国外认证 -> Linux认证 -> 经验交流 -> 
vsftpd-1.1.3配制文件vsftpd.conf

2005-11-15 15:10:11 来源:未知
  
# 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  
#  
  百事特软件编程课程 JAVA软件开发专业
  java2语言核心技术 平面设计师就业班

# 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  
#  
# 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  
#  
# 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  
#  
# Uncomment this if you want the anonymous FTP user to be able to create  
# new directories.  
#anon_mkdir_write_enable=YES  
#  
# 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  
#  
# 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  
#  
# 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  
#  
# 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_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  
关于vsftpd.conf中一些极为重要的说明:有些是在vsftpd.conf中是没有的,我们也可以加上  
.TH VSFTPD.CONF 5  
.SH NAME  
vsftpd.conf, the config file for vsftpd  
.SH DESCRIPTION  
vsftpd.conf may be used to control various aspects of vsftpd’s behaviour. By  
default, vsftpd looks for this file at the location  
.BR /etc/vsftpd.conf .  
However, you may override this by specifying a command line argument to  
vsftpd. The command line argument is the pathname of the configuration file  
for vsftpd. This behaviour is useful because you may wish to use an advanced  
inetd such as  
.BR xinetd  
to launch vsftpd with different configuration files on a per virtual host  
basis.  
.SH FORMAT  
The format of vsftpd.conf is very simple. Each line is either a comment or  
a directive. Comment lines start with a # and are ignored. A directive line  
has the format:  
option=value  
It is important to note that it is an error to put any space between the  
option, = and value.  
Each setting has a compiled in default which may be modified in the  
configuration file.  
.SH BOOLEAN OPTIONS  
Below is a list of boolean options. The value for a boolean option may be set  
to  
.BR YES  
or  
.BR NO .  
.TP  
.B anon_mkdir_write_enable  
If set to YES, anonymous users will be permitted to create new directories  
under certain conditions. For this to work, the option  
.BR write_enable  
must be activated, and the anonymous ftp user must have write permission on  
the parent directory.  
Default: NO  
.TP  
.B anon_other_write_enable  
If set to YES, anonymous users will be permitted to perform write operations  
other than upload and create directory, such as deletion and renaming. This  
is generally not recommended but included for completeness.  
Default: NO  
.TP  
.B anon_upload_enable  
If set to YES, anonymous users will be permitted to upload files under certain  
conditions. For this to work, the option  
.BR write_enable  
must be activated, and the anonymous ftp user must have write permission on  
desired upload locations.  
Default: NO  
.TP  
.B anon_world_readable_only  
When enabled, anonymous users will only be allowed to download files which  
are world readable. This is recognising that the ftp user may own files,  
especially in the presence of uploads.  
Default: YES  
.TP  
.B anonymous_enable  
Controls whether anonymous logins are permitted or not. If enabled,  
both the usernames  
.BR ftp  
and  
.BR anonymous  
are recognised as anonymous logins.  
Default: YES  
.TP  
.B ascii_download_enable  
When enabled, ASCII mode data transfers will be honoured on downloads.  
Default: NO  
.TP  
.B ascii_upload_enable  
When enabled, ASCII mode data transfers will be honoured on uploads.  
Default: NO  
.TP  
.B async_abor_enable  
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 disabled by default. Unfortunately, some FTP  
clients will hang when cancelling a transfer unless this feature is available,  
so you may wish to enable it.  
Default: NO  
.TP  
.B check_shell  
Note! This option only has an effect for non-PAM builds of vsftpd. If disabled,  
vsftpd will not check /etc/shells for a valid user shell for local logins.  
Default: YES  
.TP  
.B chown_uploads  
If enabled, all anonymously uploaded files will have the ownership changed  
to the user specified in the setting  
.BR chown_username .  
This is useful from an administrative, and perhaps security, standpoint.  
Default: NO  
.TP  
.B chroot_list_enable  
If activated, you may provide a list of local users who are placed in a  
chroot() jail in their home directory upon login. The meaning is slightly  
different if chroot_local_user is set to YES. In this case, the list becomes  
a list of users which are NOT to be placed in a chroot() jail.  
By default, the file containing this list is  
/etc/vsftpd.chroot_list, but you may override this with the  
.BR chroot_list_file  
setting.  
Default: NO  
.TP  
.B chroot_local_user  
If set to YES, local users will be placed in a chroot() jail in their home  
directory after login.  
.BR Warning:  
This option has security implications, especially if the users have upload  
permission, or shell access. Only enable if you know what you are doing.  
Note that these security implications are not vsftpd specific. They apply to  
all FTP daemons which offer to put local users in chroot() jails.  
Default: NO  
.TP  
.B connect_from_port_20  
This controls whether PORT style data connections use port 20 (ftp-data) on  
the server machine. For security reasons, some clients may insist that this  
is the case. Conversely, disabling this option enables vsftpd to run with  
slightly less privilege.  
Default: NO (but the sample config file enables it)  
.TP  
.B deny_email_enable  
If activated, you may provide a list of anonymous password e-mail responses  
which cause login to be denied. By default, the file containing this list is  
/etc/vsftpd.banned_emails, but you may override this with the  
.BR banned_email_file  
setting.  
Default: NO  
.TP  
.B dirmessage_enable  
If enabled, users of the FTP server can be shown messages when they first  
enter a new directory. By default, a directory is scanned for the  
file .message, but that may be overridden with the configuration setting  
.BR message_file .  
Default: NO (but the sample config file enables it)  
.TP  
.B guest_enable  
If enabled, all non-anonymous logins are classed as "guest" logins. A guest  
login is remapped to the user specified in the  
.BR guest_username  
setting.  
Default: NO  
.TP  
.B hide_ids  
If enabled, all user and group information in directory listings will be  
displayed as "ftp".  
Default: NO  
.TP  
.B listen  
If enabled, vsftpd will run in standalone mode. This means that vsftpd must  
not be run from an inetd of some kind. Instead, the vsftpd executable is  
run once directly. vsftpd itself will then take care of listening for and  
handling incoming connections.  
Default: NO  
.TP  
.B local_enable  
Controls whether local logins are permitted or not. If enabled, normal  
user accounts in /etc/passwd may be used to log in.  
Default: NO  
.TP  
.B log_ftp_protocol  
When enabled, all FTP requests and responses are logged, providing the option  
xferlog_std_format is not enabled. Useful for debugging.  
Default: NO  
.TP  
.B ls_recurse_enable  
When enabled, this setting will allow the use of "ls -R". This is a minor  
security risk, because a ls -R at the top level of a large site may consume  
a lot of resources.  
Default: NO  
.TP  
.B no_anon_password  
When enabled, this prevents vsftpd from asking for an anonymous password -  
the anonymous user will log straight in.  
Default: NO  
.TP  
.B one_process_model  
If you have a Linux 2.4 kernel, it is possible to use a different security  
model which only uses one process per connection. It is a less pure security  
model, but gains you performance. You really don’t want to enable this unless  
you know what you are doing, and your site supports huge numbers of  
simultaneously connected users.  
Default: NO  
.TP  
.B passwd_chroot_enable  
If enabled, along with  
.BR chroot_local_user  
, then a chroot() jail location may be specified on a per-user basis. Each  
user’s jail is derived from their home directory string in /etc/passwd. The  
occurence of /./ in the home directory string denotes that the jail is at that  
particular location in the path.  
Default: NO  
.TP  
.B pasv_enable  
Set to NO if you want to disallow the PASV method of obtaining a data  
connection.  
Default: YES  
.TP  
.B pasv_promiscuous  
Set to YES if you want to disable the PASV security check that ensures the  
data connection originates from the same IP address as the control connection.  
Only enable if you know what you are doing! The only legitimate use for this  
is in some form of secure tunnelling scheme.  
Default: NO  
.TP  
.B port_enable  
Set to NO if you want to disallow the PORT method of obtaining a data  
connection.  
Default: YES  
.TP  
.B port_promiscuous  
Set to YES if you want to disable the PORT security check that ensures that  
outgoing data connections can only connect to the client. Only enable if  
you know what you are doing!  
Default: NO  
.TP  
.B setproctitle_enable  
If enabled, vsftpd will try and show session status information in the system  
process listing. In other words, the reported name of the process will change  
to reflect what a vsftpd session is doing (idle, downloading etc). You  
probably want to leave this off for security purposes.  
Default: NO  
.TP  
.B tcp_wrappers  
If enabled, and vsftpd was compiled with tcp_wrappers support, incoming  
connections will be fed through tcp_wrappers access control. Furthermore,  
there is a mechanism for per-IP based configuration. If tcp_wrappers sets  
the VSFTPD_LOAD_CONF environment variable, then the vsftpd session will try  
and load the vsftpd configuration file specified in this variable.  
Default: NO  
.TP  
.B text_userdb_names  
By default, numeric IDs are shown in the user and group fields of directory  
listings. You can get textual names by enabling this parameter. It is off  
by default for performance reasons.  
Default: NO  
.TP  
.B use_localtime  
If enabled, vsftpd will display directory listings with the the time in your  
local time zone. The default is to display GMT. The times returned by the  
MDTM FTP command are also affected by this option.  
Default: NO  
.TP  
.B use_sendfile  
An internal setting used for testing the relative benefit of using the  
sendfile() system call on your platform.  
Default: YES  
.TP  
.B userlist_deny  
This option is examined if  
.B userlist_enable  
is activated. If you set this setting to NO, then users will be denied login  
unless they are explicitly listed in the file specified by  
.BR userlist_file .  
When login is denied, the denial is issued before the user is asked for a  
password.  
Default: YES  
.TP  
.B userlist_enable  
If enabled, vsftpd will load a list of usernames, from the filename given by  
.BR userlist_file .  
If a user tries to log in using a name in this file, they will be denied  
before they are asked for a password. This may be useful in preventing  
cleartext passwords being transmitted. See also  
.BR userlist_deny .  
Default: NO  
.TP  
.B write_enable  
This controls whether any FTP commands which change the filesystem are allowed  
or not. These commands are: STOR, DELE, RNFR, RNTO, MKD, RMD, APPE and SITE.  
Default: NO  
.TP  
.B xferlog_enable  
If enabled, a log file will be maintained detailling uploads and downloads.  
By default, this file will be placed at /var/log/vsftpd.log, but this location  
may be overridden using the configuration setting  
.BR xferlog_file .  
Default: NO (but the sample config file enables it)  
.TP  
.B xferlog_std_format  
If enabled, the transfer log file will be written in standard xferlog format,  
as used by wu-ftpd. This is useful because you can reuse existing transfer  
statistics generators. The default format is more readable, however.  
Default: NO  
.SH NUMERIC OPTIONS  
Below is a list of numeric options. A numeric option must be set to a non  
negative integer. Octal numbers are supported, for convenience of the umask  
options. To specify an octal number, use 0 as the first digit of the number.  
.TP  
.B accept_timeout  
The timeout, in seconds, for a remote client to establish connection with  
a PASV style data connection.  
Default: 60  
.TP  
.B anon_max_rate  
The maximum data transfer rate permitted, in bytes per second, for anonymous  
clients.  
Default: 0 (unlimited)  
.TP  
.B anon_umask  
The value that the umask for file creation is set to for anonymous users. NOTE! If you want to specify octal values, remember the "0" prefix otherwise the  
value will be treated as a base 10 integer!  
Default: 077  
.TP  
.B connect_timeout  
The timeout, in seconds, for a remote client to respond to our PORT style  
data connection.  
Default: 60  
.TP  
.B data_connection_timeout  
The timeout, in seconds, which is roughly the maximum time we permit data  
transfers to stall for with no progress. If the timeout triggers, the remote  
client is kicked off.  
Default: 300  
.TP  
.B file_open_mode  
The permissions with which uploaded files are created. Umasks are applied  
on top of this value. You may wish to change to 0777 if you want uploaded  
files to be executable.  
Default: 0666  
.TP  
.B ftp_data_port  
The port from which PORT style connections originate (as long as the poorly  
named  
.BR connect_from_port_20  
is enabled).  
Default: 20  
.TP  
.B idle_session_timeout  
The timeout, in seconds, which is the maximum time a remote client may spend  
between FTP commands. If the timeout triggers, the remote client is kicked  
off.  
Default: 300  
.TP  
.B listen_port  
If vsftpd is in standalone mode, this is the port it will listen on for  
incoming FTP connections.  
Default: 21  
.TP  
.B local_max_rate  
The maximum data transfer rate permitted, in bytes per second, for local  
authenticated users.  
Default: 0 (unlimited)  
.TP  
.B local_umask  
The value that the umask for file creation is set to for local users. NOTE! If  
you want to specify octal values, remember the "0" prefix otherwise the value  
will be treated as a base 10 integer!  
Default: 077  
.TP  
.B max_clients  
If vsftpd is in standalone mode, this is the maximum number of clients which  
may be connected. Any additional clients connecting will get an error message.  
Default: 0 (unlimited)  
.TP  
.B max_per_ip  
If vsftpd is in standalone mode, this is the maximum number of clients which  
may be connected from the same source internet address. A client will get an  
error message if they go over this limit.  
Default: 0 (unlimited)  
.TP  
.B pasv_max_port  
The maximum port to allocate for PASV style data connections. Can be used to  
specify a narrow port range to assist firewalling.  
Default: 0 (use any port)  
.TP  
.B pasv_min_port  
The minimum port to allocate for PASV style data connections. Can be used to  
specify a narrow port range to assist firewalling.  
Default: 0 (use any port)  
.SH STRING OPTIONS  
Below is a list of string options.  
.TP  
.B anon_root  
This option represents a directory which vsftpd will try to change into  
after an anonymous login. Failure is silently ignored.  
Default: (none)  
.TP  
.B banned_email_file  
This option is the name of a file containing a list of anonymous e-mail  
passwords which are not permitted. This file is consulted if the option  
.BR deny_email_enable  
is enabled.  
Default: /etc/vsftpd.banned_emails  
.TP  
.B banner_file  
This option is the name of a file containing text to display when someone  
connects to the server. If set, it overrides the banner string provided by  
the  
.BR ftpd_banner  
option.  
Default: (none)  
.TP  
.B chown_username  
This is the name of the user who is given ownership of anonymously uploaded  
files. This option is only relevant if another option,  
.BR chown_uploads ,  
is set.  
Default: root  
.TP  
.B chroot_list_file  
The option is the name of a file containing a list of local users which  
will be placed in a chroot() jail in their home directory. This option is  
only relevant if the option  
.BR chroot_list_enable  
is enabled, and the option  
.BR chroot_local_user  
is disabled.  
Default: /etc/vsftpd.chroot_list  
.TP  
.B guest_username  
See the boolean setting  
.BR guest_enable  
for a description of what constitutes a guest login. This setting is the  
real username which guest users are mapped to.  
Default: ftp  
.TP  
.B ftp_username  
This is the name of the user we use for handling anonymous FTP. The home  
directory of this user is the root of the anonymous FTP area.  
Default: ftp  
.TP  
.B ftpd_banner  
This string option allows you to override the greeting banner displayed  
by vsftpd when a connection first comes in.  
Default: (none - default vsftpd banner is displayed)  
.TP  
.B listen_address  
If vsftpd is in standalone mode, the default listen address (of all local  
interfaces) may be overridden by this setting. Provide a numeric IP address.  
Default: (none)  
.TP  
.B local_root  
This option represents a directory which vsftpd will try to change into  
after a local (i.e. non-anonymous) login. Failure is silently ignored.  
Default: (none)  
.TP  
.B message_file  
This option is the name of the file we look for when a new directory is  
entered. The contents are displayed to the remote user. This option is  
only relevant if the option  
.BR dirmessage_enable  
is enabled.  
Default: .message  
.TP  
.B nopriv_user  
This is the name of the user that is used by vsftpd when it want to be  
totally unprivileged. Note that this should be a dedicated user, rather  
than nobody. The user nobody tends to be used for rather a lot of important  
things on most machines.  
Default: nobody  
.TP  
.B pam_service_name  
This string is the name of the PAM service vsftpd will use.  
Default: ftp  
.TP  
.B pasv_address  
Use this option to override the IP address that vsftpd will advertise in  
response to the PASV command. Provide a numeric IP address.  
Default: (none - the address is taken from the incoming connected socket)  
.TP  
.B secure_chroot_dir  
This option should be the name of a directory which is empty. Also, the  
directory should not be writable by the ftp user. This directory is used  
as a secure chroot() jail at times vsftpd does not require filesystem access.  
Default: /usr/share/empty  
.TP  
.B user_config_dir  
This powerful option allows the override of any config option specified in  
the manual page, on a per-user basis. Usage is simple, and is best illustrated  
with an example. If you set  
.BR user_config_dir  
to be  
.BR /etc/vsftpd_user_conf  
and then log on as the user "chris", then vsftpd will apply the settings in  
the file  
.BR /etc/vsftpd_user_conf/chris  
for the duration of the session. The format of this file is as detailed in  
this manual page!  
Default: (none)  
.TP  
.B userlist_file  
This option is the name of the file loaded when the  
.BR userlist_enable  
option is active.  
Default: /etc/vsftpd.user_list  
.TP  
.B xferlog_file  
This option is the name of the file to which we write the transfer log. The  
transfer log is only written if the option  
.BR xferlog_enable  
is set.  
Default: /var/log/vsftpd.log  
.SH AUTHOR  
chris@scary.beasts.org 

  
   关键词  >>Linux认证
 
新世纪电脑培训学校
北京新华电脑学校
百事特教育学院
金同方计算机学校
北大燕工教育研究院
中科院计算所培训中心

  ■ 最新推荐课程

 ·长城平面设计师就业专修课程  ·育人电脑组装维修培训课程  ·新科海三维设计师就业班课程
 ·中科院JAVA软件工程师培训课程  ·中科院计计算机网络系统集成  ·千禧艺海高级三维室内装潢设计
 ·金同方高级文秘助理实战课程  ·科华时代 3ds max设计师课程  ·北京交通大学日语软件工程师
相关文章
 ·Novell Linux认证工程师(CLE)
 ·Linux认证考试
 ·Linux认证
 ·xIT-Linux认证-考试心得-bell-
 ·选择Linux认证的N个理由
论坛热贴
 【发表评论】
 昵称:
 内容:
 
 【最新评论】 更多...
中招在线版权与免责声明:
① 凡本站注明“稿件来源:中招在线”的所有文字、图片和音视频稿件,版权均属本网所有,任何媒体、网站或个人未经本网协议授权不得转载、链接、转贴或以其他方式复制发表。已经本站协议授权的媒体、网站,在下载使用时必须注明"稿件来源:中招在线",违者本站将依法追究责任。
② 本站注明稿件来源为其他媒体的文/图等稿件均为转载稿,本站转载出于非商业性的教育和科研之目的,并不意味着赞同其观点或证实其内容的真实性。如转载稿涉及版权等问题,请作者在两周内速来电或来函联系。
热 点 聚 焦
Google
   
精 彩 推 荐
免费下载Firefox,改进网页浏览
免费下载相片软件整理你的照片
·新科海平面设计师就业课程
·新科海软件测试工程师课程
·理工百事特软件编程课程
·百事特装饰装潢设计师课程
·J2EE Struts及XML编程技术
·千禧艺海影视后期特效课程
·JAVA软件开发专业课程
·清华万博1+6网络技术总监
·中科院企业VI平面广告课程
·中科院VC++ 6.0/VC++.Net
 
本周院校排行榜
最新资源排行榜
 
 
关于中招 - 广告服务 - 网站建设 - 版权声明 - 联系我们 - 英才加盟 - 网站地图 - 友情链接 - 免责声明 - 设为首页
Copyright @ 2005-2008 zhongzhao.com All Rights Reserved.
中招在线 版权所有