不熟悉的博客

欢迎访问不熟悉的博客

  :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

vsftpd可以对每个用户特别限制.
只要给那个用户建立一个设置文件,然后在文件里设置

在vsftpd.conf里加
user_config_dir=/etc/vsftpd/vsftpd_user_conf,这是文件夹.当然你可以自己选把用户文件放在哪
在此文件夹里新建一个文件,跟用户名相同.VSFTPD会比对用户名和用户设置文件.

在文件里加
local_root=PATH to directory就可以更改用户的home directory
local_max_rate=XXXX就可以限制此用户的带宽.
cmds_allowed=XXXXX, 此用户可以使用的指令

# ABOR - abort a file transfer
# CWD - change working directory
# DELE - delete a remote file
# LIST - list remote files
# MDTM - return the modification time of a file
# MKD - make a remote directory
# NLST - name list of remote directory
# PASS - send password
# PASV - enter passive mode
# PORT - open a data port
# PWD - print working directory
# QUIT - terminate the connection
# RETR - retrieve a remote file
# RMD - remove a remote directory
# RNFR - rename from
# RNTO - rename to
# SITE - site-specific commands
# SIZE - return the size of a file
# STOR - store a file on the remote host
# TYPE - set transfer type
# USER - send username
#
# less common commands:
# ACCT* - send account information
# APPE - append to a remote file
# CDUP - CWD to the parent of the current directory
# HELP - return help on using the server
# MODE - set transfer mode
# NOOP - do nothing
# REIN* - reinitialize the connection
# STAT - return server status
# STOU - store a file uniquely
# STRU - set file transfer structure
# SYST - return system type

参数说明:LIST 文件或目录列表

STOR 存储文件

MKD 创建目录

CWD 改变目录

ABOR 终止进程

REST 断点续传

--------------------------------------

在线使用的脚本

local_root=/home/dbbackup
cmds_allowed=MKD,LIST,PASV,ABOR,REST,NLST,RMD,RNFR,FNTO,SIZE,PORT,STOR,QUIT
local_max_rate=80000000

-----------------------------------------

前提配置文件中要开启:

tcp_wrappers=YES


限制ip访问,只使用hosts.allow文件即可,不用动hosts.deny文件

vsftpd:222.90.72.87 61.150.91.10:allow
vsftpd:all:deny

posted on 2011-10-20 10:40  不熟悉  阅读(7799)  评论(0编辑  收藏  举报