Internet Marketing and Web Development Resources
Home Site Map About Contact

LinkShare Merchandiser FTP Commands Reference


Table of Contents

Introduction


Return to Network Specific Implementation Guides and Documentations or Affiliate Marketing Resources Home

LinkShare Merchandiser FTP Account Basics

  • LinkShare Merchandiser FTP Server Address: aftp.linksynergy.com
  • Username: usually the same as you LinkShare publisher web-interface user name
  • Password: different from your web-interface password and provided to you via email from the LinkShare Merchandiser support team, when they setup access to the Merchandiser services for your main or specified "marketing channel (name)" (SID) when you signed up for access to the product data feeds via their web form.

The LinkShare Merchandiser FTP Server at aftp.linksynergy.com is basically running on a typical UNIX server and supports most FTP commands that you are maybe familiar with from the APACHE FTP Server. It also supports some SITE specific commands that were added to the set of standard commands.

The HELP information that are returned if you Type HELP or "HELP " at the LinkShare FTP Server is very short and not descriptive at all. It basically returns only the Syntax of the command and possible pre-determined parameters/select options without a description of what the command actually does and or what the meaning is of any of the select options that are available as parameter choices. This reference remedies that short-coming and lack of documentation by LinkShare.

This Reference is supplementing the LinkShare Merchandiser Datafeed Access Tips and Tricks documentation. Also of interest should be the documentation of the LinkShare Merchandiser Delimited Datafeeds.

Please Note that some FTP clients automatically support their native commands and translate them automatically to the command format of the remote server.

For example the Windows FTP client that comes with the OS by default still allows the use of commands like DIR or TYPE ASCII and changes them automatically to LIST or TYPE A when it transmits the request to the remote FTP Server. This happens invisible to the USER. FTP Clients that do not perform automatic translation of commands, such as CUTEFTP, require that you are using the exact command format that is used and understood by the remote server. Those commd formats for the LinkShare Merchandiser FTP Server are specified below.

- top -

FTP Command Reference


Return to Network Specific Implementation Guides and Documentations or Affiliate Marketing Resources Home

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.

- top -

Supported Site FTP Commands Reference


Return to Network Specific Implementation Guides and Documentations or Affiliate Marketing Resources Home

Supported Site Commands that are implemented for the Linkshare Merchandiser FTP Server
(sorted alphabetically):

ALIAS - CDPATH - CHECKMETHOD - CHECKSUM - CHMOD - GROUPS - HELP - IDLE - UMASK

Site Commands are called like "SITE <COMMAND>".



ALIAS
SITE ALIAS [ <sp> alias ]

Show settings for a specific ALIAS or list all defined ALIAS', if no alias name was specified. Alias' can be set by administrators or users with sufficient permissions to assign a short "alias" to a specifc path. For example: If an alias "default" was specified in the root of the FTP site for a sub-directory "/pub/data/allusers/main/", the command "CWD default" would take you to the sub-directory "/pub/data/allusers/main/", just like the long command "CWD /pub/data/allusers/main/" would.
CDPATH
SITE CDPATH [ <sp> ]

Show defined "Search Paths". Search Paths are similar to ALIAS' . It makes a sub-directory of a lower level accessible directly in the directory where it was configured as search path. If for example "/pub/data/allusers/main/" was set as search path for the root directory, "CWD main" would take you directly to the "main" directory under "/pub/data/allusers/".
CHECKMETHOD
SITE CHECKMETHOD [ <sp> crc|md5 ]

Specifies the Algorithm used for the Checksum Calculation of Files. CRC (POSIX) or MD5 Hash. CRC is the default.
CHECKSUM
SITE CHECKSUM [ <sp> file-name ]

Returns Checksum of the specified file using the algorithm that is set via CHECKMETHOD (or using the default, in this case CRC)
CHMOD
SITE CHMOD <sp> mode <sp> file-name

UNIX permission bits of a file (file-name) to be changed to "mode". Here "mode" is a sequence of base-8 ASCII digits expressing a number between 000 octal and 777 octal, such as "077", "002" or "011".
GROUPS
SITE GROUPS [ <sp> ]

Group Membership for File Permissions. Similar to Groups in Windows User Management (Administrators, Guests, Users, Power Users etc.). The Group Membership for my FTP user at LinkShare is for example: 50020
HELP
Help for Site Specific commands, like "SITE HELP <COMMAND>", for example: "SITE HELP ALIAS"
IDLE
SITE IDLE [ <sp> maximum-idle-time ]

Change Idle - time after which the Server will automatically disconnect you due to inactivity.
UMASK
SITE UMASK [ <sp> umask ]

Specify/Set UNIX File Permissions (file mode bits) for files that you are going to transfer to the remote server or to change permissions of an existing remotefile (if file name was specified). (In listings are permission settings shown like: rw-r--r-- . A "fully loaded" set of file modes would look like this: -rwxrwxrwx). Examples: "site umask 002" or "site chmod 022 <remotefile >". To change permission of a remote file, also see SITE CHMOD command.

- 077, read and write only for the owner
- 002, read for everyone, write for owner and group
- 011, don't set execute permission for group or world

- top -

Not Supported Commands


Return to Network Specific Implementation Guides and Documentations or Affiliate Marketing Resources Home

The following FTP Commands are not supported by the Linkshare Merchandiser FTP Server.

ACCT
This command is used to send account information on systems that require it. Typically sent after a PASS command.
REIN
Reinitializes the command connection - cancels the current user/password/account information. Should be followed by a USER command for another login.
- top -

Linkshare Datafeed and General Affiliate Product Datafeed Resources


Return to Network Specific Implementation Guides and Documentations or Affiliate Marketing Resources Home


Other Data Feed Guides, Articles and Resources for Affiliates and Advertisers


- top -

Cumbrowski.com Sponsors

See the Advertiser Kit to learn more about sponsorship opportunities at Cumbrowski.com. Press? Download my Media Kit.

Email Alert & Newsletter (privacy) My Blog Posts and Newsletter (read)


Enter your email address:

or ReveNews - Carsten Cumbrowski - Feed