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
Note: Do not use line breaks or spaces. Otherwise, it will be ineffective ..
# 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
# 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
Very useful permission control statements For VSFTPD
Maybe some permissions may be unsatisfactory when using FTP. The hope I can provide is useful to you!
Let's take a look at the following examples:
1. Upload only. Cannot be downloaded, deleted, or renamed.
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. Download only. You cannot upload, delete, or rename a file. Write_enable = NO
3. You can only upload, delete, or rename a file. Cannot be downloaded. Download_enable = NO
4. You can only download, delete, or rename a file. Cannot upload.
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
The above two points are well controlled, but 1 and 4 are not so well controlled!
I have provided methods 1 and 4. Of course, you can also talk about how you implement the control of 1 and 4. We can communicate with each other!
Next I will talk about some specific parameters!
CWD-change working directory change directory
LIST-list remote files column directory
MKD-make a remote directory to create a folder
NLST-name list of remote directory
PWD-print working directory displays the current working directory
RETR-retrieve a remote file download file
STOR-store a file on the remote host
DELE-delete a remote file: delete an object
RMD-remove a remote directory Delete directory
Rename RNFR-rename from
Rename RNTO-rename
The above are common parameters. Let's take a look! The following are all the parameters in the column for your reference!
# ABOR-abort a file transfer cancel file transfer
# CWD-change working directory change directory
# DELE-delete a remote file delete an object
# LIST-list remote files column directory
# MDTM-return the modification time of a file
# MKD-make a remote directory to create a folder
# NLST-name list of remote directory
# PASS-send password
# PASV-enter passive mode
# PORT-open a data port open a transmission PORT
# PWD-print working directory: displays the current working directory
# QUIT-terminate the connection to exit
# RETR-retrieve a remote file download file
# RMD-remove a remote directory
# RNFR-rename from
# RNTO-rename
# SITE-site-specific commands
# SIZE-return the size of the file returned by 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