vsftpd cmds_allowed 權限控制

vsftpd cmds_allowed
cmds_allowed=ABOR,CWD,LIST,MDTM,MKD,NLST,
PASS,PASV,PORT,PWD,QUIT,RETR,RMD,RNFR,
RNTO,SITE,SIZE,STOR,TYPE,USER,ACCT,
APPE,CDUP,HELP,MODE,NOOP,REIN,STAT,STOU,STRU,SYST
 
注意:必定不能使用換行和空格,否則就沒效果..
 
# 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
 
VSFTPD的很是有用的權限控制語句
也許在使用FTP的過程當中,多是有一些權限控制的不如意,那下面我給你們提供的但願能對你們有用!
咱們首先來看看下面的幾個例子:
一、只能上傳。不能下載、刪除、重命名。
cmds_allowed=FEAT,REST,CWD,LIST,MDTM,MKD,NLST,PASS,PASV,PORT,PWD,QUIT,RMD,SIZE,STOR,TYPE,USER,ACCT,APPE,CDUP,HELP,MODE,NOOP,REIN,STAT,STOU,STRU,SYST
二、只能下載。不能上傳、刪除、重命名。write_enable=NO
三、只能上傳、刪除、重命名。不能下載。download_enable=NO
四、只能下載、刪除、重命名。不能上傳。
cmds_allowed=FEAT,REST,CWD,LIST,MDTM,MKD,NLST,PASS,PASV,PORT,PWD,QUIT,RMD,RNFR,RNTO,RETR,DELE,SIZE,TYPE,USER,ACCT,APPE,CDUP,HELP,MODE,NOOP,REIN,STAT,STOU,STRU,SYST
以上的二、3兩點好控制,但是1和4就不是那麼好控制了!
 
 
我給出了1和4的方法,固然,你們也能夠說說本身是如何實現1和4的控制的,咱們相互交流!
下面我就把具體的一些參數來和你們說說!
 
CWD - change working directory 更改目錄
LIST - list remote files 列目錄
MKD - make a remote directory 新建文件夾
NLST - name list of remote directory
PWD - print working directory 顯示當前工做目錄
RETR - retrieve a remote file 下載文件
STOR - store a file on the remote host 上傳文件
 
 
 
DELE - delete a remote file 刪除文件
RMD - remove a remote directory 刪除目錄
RNFR - rename from 重命名
RNTO - rename to 重命名
 
 
以上是經常使用的一些參數,你們對照學習一下!下面是列也的所有參數,供你們參考!
 
# 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 typeapp

相關文章
相關標籤/搜索