List of FTP Commands that are supported by the LinkShare Merchandiser FTP Server
(sorted alphabetically):
ABOR -
ALLO -
APPE -
AUTH -
CDUP -
CWD -
DELE -
EPRT -
EPSV -
HELP -
LIST -
LPRT -
LPSV -
MDTM -
MKD -
MODE -
NLST -
NOOP -
PASS -
PASV -
PBSZ -
PORT -
PROT -
PWD -
QUIT -
REST -
RETR -
RMD -
RNFR -
RNTO -
SITE -
SIZE -
STAT -
STOR -
STOU -
STRU -
SYST -
TYPE -
USER
- ABOR
- ABOR (abort operation, abort a file transfer)
- ALLO
- ALLO size [R max-record-size]
Allocates sufficient storage space to receive a file. If the maximum size of a record also needs to be known, that is sent as a second numeric parameter following a space, the capital letter "R", and another space.
- APPE
- APPE <sp> file-name, append to a remote file
Append data to the end of a file on the remote host. If the file does not already exist, it is created. This command must be preceded by a PORT or PASV command so that the server knows where to receive data from.
- AUTH
- AUTH <sp> auth-type
Establishes SSL encrypted session. Only SSL type is supported.
- CDUP
- CDUP (change to parent directory)
Makes the parent of the current directory be the current directory.
- CWD
- CWD [ <sp> directory-name ], change working directory
Makes the given directory be the current directory on the remote host.
- DELE
- DELE <sp> file-name
Delete a remote file at the server
- EPRT
- EPRT <sp> |af|addr|port|
The EPRT command allows for the specification of an extended address for the data connection. The extended address MUST consist of the network protocol as well as the network and transport addresses. The format of EPRT is:
EPRT |<net-prt>|<net-addr>|<tcp-port>
- EPSV
- EPSV [<sp> af|ALL]
The EPSV command requests that a server listen on a data port and wait for a connection.
- HELP
- Help, HELP command = returns help to a specific command
- LIST
- LIST [ <sp> path-name ]
Returns list of file and sub-directories in specified remote directory, if no directory was specified, the list of files and sub-directories in the current directory is returned.
If remote-filespec refers to a file, sends information about that file. If remote-filespec refers to a directory, sends information about each file in that directory. remote-filespec defaults to the current directory. This command must be preceded by a PORT or PASV command.
- LPRT
- LPRT <sp> af, hal, h1, h2, ..., pal, p1, p2, ...
The LPRT command allows users to specify a "long" address for the transport connection over which data are transferred. The LPRT command syntax is:
LPRT <SP> <long-host-port> <CRLF>
The <long-host-port> argument is the concatenation of the following fields:
- an 8-bit <address-family> argument (af)
- an 8-bit <host-address-length> argument (hal)
- a <host-address> of <host-address-length> (h1, h2, ...)
- an 8-bit <port-address-length> (pal)
- a <port-address> of <port-address-length> (p1, p2, ...)
The initial values assigned to the <address-family> argument take the value of the version number of IP (see Assigned Numbers, STD 2, RFC 1340); values in the range of 0-15 decimal are thus reserved for IP and assigned by IANA. Values in the range 16-255 are available for the IANA to assign to all other network layer protocols over which FTP may be operated.
Relevant assigned <address-family> numbers for FOOBAR are:
0 = reserved, 1-3 = unassigned, 4 = Internet Protocol (IP), 5 = ST Datagram Mode, 6 = SIP, 7 = TP/IX, 8 = PIP, 9 = TUBA, 10-14 = unassigned, 15 = reserved, 16 = Novell IPX
The value of each field is broken into 8-bit fields and the value of each field is transmitted as an unsigned decimal number (in character string representation, note that negative numbers are explicitly not permitted). The fields are separated by commas.
A LPRT command is thus of the general form:
LPRT af,hal,h1,h2,h3,h4...,pal,p1,p2...
where h1 is the high order 8 bits of the internet host address, and p1 is the high order 8 bits of the port number (transport address).
- LPSV
- LPSV (set server in long passive mode)
The L(ONG) PASSIVE command requests the server-DTP to listen on a data port other than 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 address family, host address length indicator, host address, port address length, and port address of the listener process at the server. The reply code and text for entering the passive mode using a long address is 228
Interpretation according to FTP is:
- positive completion reply 2yz,
- connections x2z,
- passive mode entered using long address xy8.
The suggested text message to accompany this reply code is:
228 Entering Long Passive Mode
(af, hal, h1, h2, h3,..., pal, p1, p2...)
- MDTM
- MDTM <sp> path-name
return the modification time of a file
Returns the last-modified time of the given file on the remote host in the format "YYYYMMDDhhmmss": YYYY is the four-digit year, MM is the month from 01 to 12, DD is the day of the month from 01 to 31, hh is the hour from 00 to 23, mm is the minute from 00 to 59, and ss is the second from 00 to 59.
- MKD
- MKD <sp> path-name
make a remote directory
- MODE
- MODE (specify transfer mode), MODE mode-character
S - Stream
B - Block
C - Compressed
Default is "S" - Stream
- NLST
- NLST [ <sp> path-name ]
name list of remote directory
Returns a list of filenames in the given directory (defaulting to the current directory), with no other information. Must be preceded by a PORT or PASV command.
- NOOP
- NOOP (do nothing)
Does nothing except return a response.
- PASS
- PASS <sp> password
send password
After sending the USER command, send this command to complete the login process. (Note, however, that an ACCT command may have to be used on some systems.)
- PASV
- PASV (set server in passive mode)
Tells the server to enter "passive mode". In passive mode, the server will wait for the client to establish a connection with it rather than attempting to connect to a client-specified port. The server will respond with the address of the port it is listening on, with a message like:
227 Entering Passive Mode (a1,a2,a3,a4,p1,p2)
where a1.a2.a3.a4 is the IP address and p1*256+p2 is the port number.
- PBSZ
- PBSZ <sp> pbsz-size
protection buffer size.
- PORT
- PORT <sp> h1, h2, h3, h4, p1, p2
open a data port
Specifies the host and port to which the server should connect for the next file transfer. This is interpreted as IP address a1.a2.a3.a4, port p1*256+p2.
- PROT
- PROT <sp> prot-level
Data channel protection level. The supported level values are C, P.
- PWD
- PWD (return current directory, print working directory )
- QUIT
- Quits FTP, terminate the connection
- REST
- REST (restart command)
Sets the point at which a file transfer should start; useful for resuming interrupted transfers. For nonstructured files, this is simply a decimal number. This command must immediately precede a data transfer command (RETR or STOR only); i.e. it must come after any PORT or PASV command.
- RETR
- RETR <sp> file-name
Retrieve/Download a specific remote file
Begins transmission of a file from the remote host. Must be preceded by either a PORT command or a PASV command to indicate where the server should send data
- RMD
- RMD <sp> path-name
remove a remote directory
Deletes the named directory on the remote host
- RNFR
- RNFR <sp> file-name
rename from
Used when renaming a file. Use this command to specify the file to be renamed; follow it with an RNTO command to specify the new name for the file.
- RNTO
- RNTO <sp> file-name
rename to
Used when renaming a file. After sending an RNFR command to specify the file to rename, send this command to specify the new name for the file.
- SITE
- To call and list site specific commands that where configured on the server.
See the list of SITE commands that are implemented for the Linkshare Merchandiser FTP.
- SIZE
- SIZE <sp> path-name
return the size of a file
Returns the size of the remote file as a decimal number.
- STAT
- STAT [ <sp> path-name ]
return server status
If invoked without parameters, returns general status information about the FTP server process. If a parameter is given, acts like the LIST command, except that data is sent over the control connection (no PORT or PASV command is required).
- STOR
- STOR <sp> file-name
store a file on the remote host
Begins transmission of a file to the remote site. Must be preceded by either a PORT command or a PASV command so the server knows where to accept data from.
- STOU
- STOU [ <sp> file-name ]
store a file uniquely
Begins transmission of a file to the remote site; the remote filename will be unique in the current directory. The response from the server will include the filename.
- STRU
- STRU (specify file structure)
Sets the file structure for transfer to one of:
F - File (no structure)
R - Record structure
P - Page structure
The default structure is "F" = File.
- SYST
- Get type of operating system where the FTP Server is running
Linkshare FTP Server is: UNIX Type: L8
Returns a word identifying the system, the word "Type:", and the default transfer type (as would be set by the TYPE command). For example: UNIX Type: L8
- TYPE
- TYPE <sp> [ A | E | I | L ], TYPE type-character [second-type-character]
Sets the type of file to be transferred. type-character can be any of:
A = ASCII text
E - EBCDIC text
I - image (binary data)
L - local format
For A and E, the second-type-character specifies how the text should be interpreted. It can be:
N - Non-print (not destined for printing). This is the default if second-type-character is omitted.
T - Telnet format control (<CR>, <FF>, etc.)
C - ASA Carriage Control
For L, the second-type-character specifies the number of bits per byte on the local system, and may not be omitted.
- USER
- USER <sp> username
Send this command to begin the login process. username should be a valid username on the system, or "anonymous" to initiate an anonymous login.
|