FTP COMMANDS
The following are the FTP commands:
USER
PASS
ACCT
CWD
CDUP
SMNT
QUIT
REIN
PORT
PASV
TYPE
STRU
MODE
OPTS
RETR
STOR
STOU
APPE
ALLO
[
REST
RNFR
RNTO
ABOR
DELE
RMD
MKD
PWD
LIST [
NLST [
SITE
SYST
STAT [
HELP [
NOOP
FTP Security commands and arguments
AUTH
ADAT
PROT
PBSZ
MIC
CONF
ENC
; must be formatted as described in section 9
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
FTP Commands
--------------------------------------------------------------------------------
The standard commands that an FTP client (such as WS_FTP Pro) issues to an FTP server are listed here with a brief explanation that has been adapted from RFC 959. The command syntax is presented using BNF (Backus-Naur Form) notation where applicable.
FTP commands may be in any order except that a "rename from" command must be followed by a "rename to" command and the REST (restart) command must be followed by the interrupted service command
(e.g., STOR or RETR).
ABOR (ABORT)
ABOR
This command tells the server to abort the previous FTP service command and any associated transfer of data.
ACCT (ACCOUNT)
ACCT
The argument field is a Telnet string identifying the user's account. The command is not necessarily related to the USER command, as some sites may require an account for login and others only for specific access, such as storing files.
ALLO (ALLOCATE)
ALLO
This command is required by some servers to reserve sufficient storage to accommodate the file to be transferred.
APPE (APPEND) (with create)
APPE
This command causes the server's data transfer process to accept the data transferred and to store the data in a file at the server site. If the file specified in pathname exists at the server site, then the data is appended to that file; otherwise the file specified in pathname is created at the server site.
CDUP (CHANGE TO PARENT DIRECTORY)
CDUP
This command is a special case of CWD which allows the transfer of directory trees between operating systems having different syntaxes for naming the parent directory.
CWD (CHANGE WORKING DIRECTORY)
CWD
This command allows the user to work with a different directory or dataset without altering his login or account information.
DELE (DELETE)
DELE
This command causes the file specified in pathname to be deleted at the server site.
FEAT
FEAT
This command causes the FTP server to list all new FTP features that the server supports beyond those described in RFC 959. A typical example
reply to the FEAT command might be a multi-line reply of the form:
C> FEAT
S> 211-Extensions supported
S> SIZE
S> MDTM
S> MLST size*;type*;perm*;create*;modify*;
S> LANG EN*
S> REST STREAM
S> TVFS
S> UTF8
S> 211 end
HELP (HELP)
HELP [
This command causes the server to send a list of supported commands and other helpful information.
LIST (LIST)
LIST [
This command causes a list of file names and file details to be sent from the FTP site to WS_FTP Pro.
MDTM (MODIFICATION TIME)
MDTM
This command can be used to determine when a file in the server NVFS was last modified.
MKD (MAKE DIRECTORY)
MKD
This command causes the directory specified in pathname to be created as a directory (if pathname is absolute) or as a subdirectory of the current working directory (if pathname is relative).
MLSD
MLSD [
If WS_FTP Pro detects that the server is an MLSD server, this command is sent to the server instead of the LIST command.
MLST
MLST [
This command causes the server to provide data about the single object named, whether a file or directory.
MODE (TRANSFER MODE)
MODE
The argument is a single Telnet character code specifying the data transfer mode. The following codes are assigned for transfer modes: S - Stream,
B - Block, C - Compressed. The default transfer mode is Stream. Note: This "transfer mode" is not equivalent to the "transfer mode" of the WS_FTP Pro user interface. The "transfer mode" referred to in WS_FTP Pro and its documentation is handled by the TYPE command.
NLST (NAME LIST)
NLST [
This command causes a list of file names (with no other information) to be sent from the FTP site to WS_FTP Pro.
NOOP (NOOP)
NOOP
This command does not affect any parameters or previously entered commands. It specifies no action other than that the server send an OK reply.
OPTS (OPTIONS)
OPTS
This command allows an FTP client to define a parameter that will be used by a subsequent command.
PASS (PASSWORD)
PASS
The argument field is a Telnet string specifying the user's password. This command must be immediately preceded by the user name command, and, for some sites, completes the user's identification for access control.
PASV (PASSIVE)
PASV
This command requests the server's data transfer process to "listen" on a data port (which is not its default data port) and to wait for a connection rather than initiate one upon receipt of a transfer command. The response to this command includes the host and port address this server is listening on.
PORT (DATA PORT)
PORT
This specifies an alternate data port. There are defaults for both the client
and server data ports, and under normal circumstances this command and its reply are not needed.
PWD (PRINT WORKING DIRECTORY)
PWD
This command causes the name of the current working directory to be returned in the reply.
QUIT (LOGOUT)
QUIT
This command terminates a USER and, if file transfer is not in progress,
closes the control connection. If file transfer is in progress, the connection will remain open for result response and the server will then close it.
QUOTE
QUOTE
The QUOTE command lets you enter any standard FTP command. WS_FTP Pro sends it to the FTP site, unedited; it is up to you to determine the command syntax depending on the FTP site you are connected to.
REIN (REINITIALIZE)
REIN
This command terminates a USER, flushing all I/O and account information, except to allow any transfer in progress to be completed. A USER command may be expected to follow.
REST (RESTART)
REST
The argument field represents the server marker at which file transfer is to
be restarted. This command does not cause file transfer but skips over
the file to the specified data checkpoint. This command shall be immediately followed by the appropriate FTP service command which causes file transfer to resume.
RETR (RETRIEVE)
RETR
This command causes the server to transfer a copy of the file specified in pathname to the client. The status and contents of the file at the server site are unaffected.
RMD (REMOVE DIRECTORY)
RMD
This command causes the directory specified in pathname to be removed as a directory (if pathname is absolute) or as a subdirectory of the current working directory (if pathname is relative).
RNFR (RENAME FROM)
RNFR
This command specifies the old pathname of the file which is to be renamed. This command must be immediately followed by a "rename to" command specifying the new file pathname.
RNTO (RENAME TO)
RNTO
This command specifies the new pathname of the file specified in the immediately preceding "rename from" command. Together the two commands cause a file to be renamed.
SITE (SITE PARAMETERS)
SITE
This allows you to enter a command that is specific to the current FTP site. WS_FTP Pro prefixes your entry with the word SITE. WS_FTP Pro sends it to the FTP site, unedited; it is up to you to determine the command syntax depending on the FTP site you are connected to.
SITE CPWD
SITE CPWD
This is a special command you can enter using WS_FTP Pro when the FTP server is a WS_FTP Server from Ipswitch. It changes the user's password.
SIZE (SIZE OF FILE)
SIZE
This command is used to obtain the transfer size of a file from the server: that is, the exact number of octets (8 bit bytes) which would be transmitted over the data connection should that file be transmitted. This value will change depending on the current STRUcture, MODE and TYPE of the data.
SMNT (STRUCTURE MOUNT)
SMNT
This command allows the user to mount a different file system data structure without altering his login or accounting information.
STAT (STATUS)
STAT [
This command causes a status response to be sent over the control connection in the form of a reply.
STOR (STORE)
STOR
This command causes the FTP server to accept the data transferred via the data connection and to store the data as a file at the FTP server. If the file specified in pathname exists at the server site, then its contents shall be replaced by the data being transferred. A new file is created at the FTP server if the file specified in pathname does not already exist.
STOU (STORE UNIQUE)
STOU
This command behaves like STOR except that the resultant file is to be created in the current directory under a name unique to that directory. The "250 Transfer Started" response must include the name generated.
STRU (FILE STRUCTURE)
STRU
The argument is a single Telnet character code specifying the file structure described in RFC 959. The following codes are assigned for structure: F - File (no record structure) R - Record structure P - Page structure. The default structure is File.
SYST (SYSTEM)
SYST
This command is used to find out the operating system of the server.
TYPE (REPRESENTATION TYPE)
TYPE
The argument specifies the file type. The following codes are assigned:
A = ASCII (text files)
N = Non-print (files that have no vertical format controls such as carriage returns and line feeds)
T = Telnet format effectors (files that have ASCII or EBCDIC vertical format controls)
E = EBCDIC (files being transferred between systems that use EBCDIC for internal character representation)
C = Carriage Control (ASA) (files that contain ASA [FORTRAN] vertical format controls)
I = Image (binary files)
L = Local byte size (files that need to be transferred using specific
non-standard size bytes)
The default representation type is ASCII Non-print.
USER (USER NAME)
USER
The argument field is a Telnet string identifying the user. The user identification is that which is required by the server for access to its
file system.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
解决ftp与cifs nas盘浏览文件,文件名中文乱码的问题:
(1) 备份原ftp配置文件:
#cp /etc/vsftpd/ vsftpd.conf /etc/vsftpd/ vsftpd.conf_newbak
(2) 编辑ftp配置文件:
#vi /etc/vsftpd/vsftpd.conf
在文件末尾添加:
cmds_allowed=PASV,PORT,TYPE,LIST,STOR,MKD,CWD,PWD,ABOR,REST,QUIT,FEAT,DELE,MDTM,NLST,PASS,RETR,RMD,RNFR,RNTO,SITE,SIZE,USER,ACCT,CDUP,REIN,STRU,MODE,STOU,APPE,ALLO,SYST,STAT,HELP, NOOP
(这是一句话,单词之间以英文逗号区分,不能有空格和回车)
(3) 保存并推出vi编辑器,重启vsftpd服务器:
#service vsftpd restart