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的過程中,可能是有一些權限控制的不如意,那下面我給大家提供的希望能對大家有用!
我們首先來看看下面的幾個例子:
1、隻能上傳。不能下載下傳、删除、重命名。
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
2、隻能下載下傳。不能上傳、删除、重命名。write_enable=NO
3、隻能上傳、删除、重命名。不能下載下傳。download_enable=NO
4、隻能下載下傳、删除、重命名。不能上傳。
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
以上的2、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 建立檔案夾
# PORT - open a data port 打開一個傳輸端口
# PWD - print working directory 顯示目前工作目錄
# QUIT - terminate the connection 退出
# RETR - retrieve a remote file 下載下傳檔案
# SIZE - return the size of a file 傳回檔案大小
# STOR - store a file on the remote host 上傳檔案