快捷搜索:  as  2018  FtCWSyGV  С˵  test  xxx  Ψһ  w3viyKQx

下载澳门新葡亰官网App_龟发之家论坛



vsftpd安装在as5下,安装包为:vsftpd-2.0.5-16.el5_4.1.i386.rpm

1、vi /etc/vsftpd/vsftpd.conf

增添一行

chroot_local_user=YES

#limit user only accessc its own directory.

2、重启启动vsftpd办事

# /etc/init.d/vsftpd restart

备注:重启办事之后,FTP所有用户都将受限定只能造访他们home目录的文件

附:/etc/vsftpd/vsftpd.conf的设置设置设备摆设摆设阐明(转载)

# Example config file /etc/vsftpd/vsftpd.conf

#

# The default compiled in settings are fairly paranoid. This sample file

# loosens things up a bit, to make the ftp daemon more usable.

# Please see vsftpd.conf.5 for all compiled in defaults.

#

# READ THIS: This example file is NOT an exhaustive list of vsftpd options.

# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's

# capabilities.

#

# Allow anonymous FTP?

anonymous_enable=NO是否容许匿名ftp,如否则选择NO

# 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 的指令是否容许变动file system,譬如STOR、DELE、RNFR、RNTO、MKD、RMD、APPE 以及SITE。预设是关闭。

# 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默认的umask码,设置本地用户的文件天生掩码为022,默认值为077。

# 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是否显示目录阐明文件,默认是YES但必要手工创建.message文件

# Activate logging of uploads/downloads.

xferlog_enable=YES是否记录ftp传输历程,假如启动,上传与下载的信息将被完备记载在底下xferlog_fi下载澳门新葡亰官网Apple 所定义的档案中。预设为开启。

# Make s下载澳门新葡亰官网Appure PORT transfer connections originate from port 20 (ftp-data).

connect_from_port_20=YES启用FTP数据端口的连接哀求,若设为YES,则逼迫ftp-data 的数据传送应用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_uplo下载澳门新葡亰官网Appads=YES若是启动,所有匿名上传数据的拥有者将被替换为chown_username 傍边所设定的应用者。这样的选项对付安然及治理,是很有用的。默认值为NO。

chown_username=whoever这里可以定义当匿名登入者上传档案时,该档案的拥有者将被置换的应用者名称。预设值为root。

# You may override where the log file goes if you like. The default is shown

# below.

xferlog_file=/var/log/vsftpd.logftp传输日志的路径和名字默认是/var/log/vsftpd.log

# If you want, you can have your log file in standard ftpd xferlog format

xferlog_std_format=YES是否应用标准的ftp xferlog模式

# You may change the default value for timing out an idle session.

idle_session_timeout=600设置默认的断开不生动session的光阴

# 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=nobody运行vsftpd必要的非特权系统用户默认是nobody

# 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敕令async

# 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 a下载澳门新葡亰官网Appscii_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

是否应用ascii码要领上传和下载文件

# 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

假如启动这项功能,则所有的本机应用者登入均可进到根目录之外的数据夹,除了列

在/etc/vsftpd.chroot_list 之中的应用者之外。默认值为NO。

# 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若是启动此功能,则容许登入者应用ls -R 这个指令。默认值为NO。

pam_service_name=v下载澳门新葡亰官网Appsftpd设置PAM认证办事的设置设置设备摆设摆设文件名称,该文件寄放 在/etc/pam.d/目录下

userlist_enable=YES

若是启动此功能,则会读取/etc/vsftpd.user_list 傍边的应用者名称。此项功能可以在询

问密码前就呈现掉败讯息,而不必要查验密码的法度榜样。默认值为关闭。

userlist_deny=NO

这个选项只有在userlist_enable 启动时才会被查验。假如将这个选项设为YES,则在

/etc/vsftpd.user_list 中的应用者将无法登入﹔ 若设为NO , 则只有在 /etc/vsftpd.user_list 中的应用者才能登入。而且此项功能可以在扣问密码前就呈现差错

讯息,而不必要查验密码的法度榜样。

#enable for standalone mode

listen=YES

若是启动,则vsftpd 将会以自力运作的要领履行,若是vsftpd 自力履行,如RedHat9

的默认值,则必须启动﹔若是vsftpd 包孕在xinetd 之中,则必须关闭此功能,如

RedHat8。在RedHat9 的默认值为YES。

tcp_wrappers=YES将vsftpd 与TCP_wrapper 结合。假如启动,则会将vsftpd 与tcp wrapper 结合,也便是可以在/etc/hosts.allow与/etc/hosts.deny 中定义可联机或是回绝

的滥觞地址。

您可能还会对下面的文章感兴趣: