Alto Pup File Transfer Program
FTP is a Pup-based File Transfer Program for moving files to and from
an Alto file system. The program comes in 3 parts:
1) An FTP Server, which listens for file transfer requests from
2) An FTP User, which initiates file transfers under control of
either the keyboard or the command line, and
3) A User Telnet for logging into a remote host using the Pup
1. Concepts and Terminology
Tranferring a file from one machine (or "host") to another over a
network requires the active cooperation of programs on both machines.
In a typical scenario for file transfer, a human user (or a program
acting on his behalf) invokes a program called an "FTP User" and
directs it to establish contact with an "FTP Server" program on another
machine. Once contact has been established, the FTP User initiates
requests and supplies parameters for the actual transfer of files,
which the User and Server proceed to carry out cooperatively. The FTP
User and FTP Server roles differ in that the FTP User interacts with
the human user (usually through some sort of keyboard interpreter) and
takes the initiative in user/server interactions, whereas the FTP
Server plays a comparatively passive role.
The question of which machine is the FTP User and which is the FTP
Server is completely independent of the direction of file transfer.
The two basic file transfer operations are called "Retrieve" and
"Store"; the Retrieve operation causes a file to move from Server to
User, whereas Store causes a file to move from User to Server.
The Alto FTP subsystem contains both an FTP User and an FTP Server,
running as independent processes. Therefore, to transfer files between
a pair of Altos, one should start up the FTP subsystem on both
machines, then issue commands to the FTP User process on one machine
directing it to establish contact with the FTP Server process in the
other machine. Subsequent file transfers are controlled entirely from
the FTP User end, with no human intervention required at the Server
Transferring files to or from a Maxc system or an IFS involves
establishing contact with FTP Server processes that run all the time on
those machines. Hence, one may simply invoke the Alto FTP subsystem
and direct its FTP User process to connect to the machine.
In the descriptions that follow, the terms "local" and "remote" are
Copyright Xerox Corporation 1982
Alto Pup FTP December 12, 1981 2
relative to the machine on which the FTP User program is active. That
is, we speak of typing commands to our "local" FTP User program and
directing it to establish contact with an FTP Server on some "remote"
machine. A Retrieve command then copies a file from the "remote" file
system to the "local" file system, whereas a Store command copies a
file from the "local" file system to the "remote" file system.
Furthermore, we refer to "local" and "remote" filenames. These must
conform to the conventions used by the "local" and "remote" host
computers, which may be dissimilar (for example, Alto versus Maxc).
The Alto FTP knows nothing about Maxc filename conventions or vice
The Alto FTP subsystem also includes a third process, called a "User
Telnet", which simulates a terminal in a manner exactly analogous to
the Chat subsystem (though lacking some of its finer features). By
this means, you may log in to a file sytem machine to perform
operations not directly available via the basic file transfer
mechanisms. If you log into Maxc, it is even possible to run "PupFTP",
the Maxc FTP User program, and direct it to establish contact with the
FTP Server in your own Alto. You should probably not try this unless
you really understand what you are doing, however, since the terms
"local" and "remote" are relative to Maxc rather than to your Alto
(since the FTP User program is running on Maxc in this case), which can
2. Calling the FTP Subsystem
A number of options are available when running FTP. The program
decides which parts of itself to enable and where user commands will
come from by inspecting the command line. The general form of the
command line to invoke FTP looks like:
FTP[/] [  ]
The square brackets denote portions of the command line that are
optional and may be omitted.
Global switches, explained below, select some global program options
such as using the Trident disk instead of the Diablo. The first token
after the , if present, is assumed to be a
(a discussion of which appears later in the description of the "Open"
command). The User FTP will attempt to connect to the FTP Server on
that host. After connecting to the server, if a is
present, an interpreter is started which feeds these commands to the
User FTP. When the command list is exhausted, FTP returns to the Alto
Executive. If no command list is present, an interactive keyboard
command interpreter is started.
Each global switch has a default value which is used if the switch is
not explicitly set. To set a switch to 'false' proceed it with a
'minus' sign (thus FTP/-S means 'no Server'), to set a switch to 'true'
just mention the switch.
Switch Default Function
Alto Pup FTP December 12, 1981 3
/S true [Server] starts the FTP Server. The Server is not
started if the User is enabled and is being
controlled from the command line.
/U true [User] starts the FTP User. As explained above, the
interactive command interpreter or the command line
interpreter will be started depending on the
contents of the command line.
/C true [Chat] starts the Telnet. The Telnet is not started
if the User is enabled and is being controlled from
the command line, or if the system disk is a
/T false [Trident] sets the system disk to be a Trident
drive. The default is 0, but can be changed by
following the /T with a unit number. The unit
number is octal; the high byte is the logical
filesystem number and the low byte is the physical
drive number. User and Server commands apply to
files on this disk but command line input and log
output use the Diablo drive.
/L * [Log] causes all output to the User FTP window to
also go to the file "FTP.log" on DP0, overwriting
the previous contents. Log is true if the User is
enabled and is being controlled from the command
/A false [AppendLog] enables the log but appends to FTP.log
rather than overwriting it.
/E true [Error] causes FTP to ask you if you want to
continue when a non-fatal error happens during
execution of a command line. FTP/-E will cause FTP
to recover automatically from non fatal errors
without consulting you.
/R true [Ram] allows FTP to use some microcode which speeds
things up slightly. If your Alto has no ram, this
switch is ignored.
/D false [Debug] starts FTP in debug mode.
The rest of the global switches are explained below under 'Server
2.1. FTP User Log
FTP can keep a log (typescript) file for the FTP User window. The file
name is 'FTP.log'. It is always enabled when FTP is being controlled
from the command line; otherwise it is controlled by the /L and /A
Alto Pup FTP December 12, 1981 4
2.2. Using a Trident Disk
Starting FTP with the /T global switch causes FTP to store and retreive
files from a Trident disk. By default, FTP will open TP0; other disks
may be opened by appending their unit numbers to the /T switch. Thus
"FTP/T1" will open TP1, and "FTP/T400" will open logical filesystem 1
on physical unit 0.
Accessing a file on a Trident requires more code and more free storage
than accessing a file on the Diablo. Since FTP is very short on space,
only a User or a Server FTP is started when the /T switch is set. The
default is to start a User FTP, but specifying no user (FTP/T-U) or
specifying a server (FTP/TS) will start a Server FTP instead.
2.3. Server Options
Server options are controlled by switches on the subsystem name and
subcommands of the SERVER keyboard command. There are currently four
switch Default Function
none If no server option is specified, retrieve requests
(disk to net) are allowed. Store requests (net to
disk) are allowed unless the store would overwrite
an existing file. Delete and Rename are not
/P false [Protected] Retrieve requests are allowed. No
stores are allowed. Delete and Rename are not
/O false [Overwrite] Retrieve requests are allowed. Store
requests can overwrite files. Delete and rename are
/K false [Kill] FTP will return to the Alto Exec when the
server connection is closed. A simple form of
remote job entry can be performed by storing into
3. The FTP Display
The top inch or so of the display contains a title line that displays
the release date of that version of FTP, the current date and time, the
machine's internetwork address, and the number of free pages on the
disk. A window is created below the title line for each part of FTP
which is enabled during a session (server, user, and telnet).
If the FTP Server is enabled, it opens a window and identifies itself.
If a User FTP subsequently connects to this Server, the User's network
address will be displayed. The Server will log the commands it carries
out on behalf of the remote User in this window. The Server is not
enabled when FTP is being controlled from the command line.
Alto Pup FTP December 12, 1981 5
The FTP User opens the next window down and identifies itself. The
command herald is an asterisk.
The User Telnet opens the bottommost window, identifies itself, and
waits for a host name to be entered. The Telnet is not enabled when
FTP is being controlled from the command line.
4. Keyboard Command Syntax
FTP's interactive command interpreter presents a user interface very
similar to that of the Alto Executive. Its command structure is also
very similar to that of the Maxc Pup FTP program (PupFTP), and the Maxc
ArpaNet FTP program (FTP). The standard editing characters, command
recognition features, and help facility (via "?") are available. When
FTP is waiting for keyboard input, a blinking cursor appears at the
next character position.
4.1. Directing Keyboard input to the User and Telnet
The bottom two unmarked keys control which window gets characters from
the keyboard. Hitting the unmarked key to the right of 'right-shift'
(also known as the 'Swat key') directs keyboard input to the Telnet
window. Hitting the unmarked key to the right of the 'return' key
(also known as the 'Chat key') directs keyboard input to the FTP User
window. The window which currently owns the keyboard will blink a
cursor at the next character position if it is waiting for type-in.
4.2. Keyboard Commands
Opens a connection to the FTP Server in the specified host. FTP
permits only one user connection at a time. In most cases the
word OPEN may be omitted: i.e., a well formed is a
legal command and implies a request to OPEN a connection. FTP
will try for one minute to connect to the specified host. If you
made a mistake typing the host name and wish to abort the
connection attempt, hit the middle unmarked key (to the right of
Ordinarily, host name should be the name of the machine you wish
to connect to (e.g., "Maxc"). Most Altos have names which are
registered in Name Lookup Servers. So long as a name lookup
server is available, FTP is able to obtain the information
necessary to translate a known host name to an inter-network
If the host name of the server machine is not known or if no name
lookup servers are available, you may specify an inter-network
address in place of the host name. The general form of an inter-
network address is:
Alto Pup FTP December 12, 1981 6
where each of the three fields is an octal number. The
number designates the network to which the Server host is
connected (which may be different from the one to which the User
host is connected); this (along with the "#" that follows it) may
be omitted if the Server and User are known to be connected to the
same network. The number designates the Server host's
address on that network. The number designates the
actual Server process on that host; ordinarily it should be
omitted, since the default is the regular FTP server socket.
Hence, to connect to the FTP server running in Alto host number
123 on the directly-connected Ethernet, you should say "OPEN 123#"
(the trailing "#" is required).
Closes the currently open User FTP connection. CLOSE cancels any
defaults set by CONNECT, DIRECTORY, DEVICE, BYTE, TYPE, or EOLC
Supplies any login parameters required by the remote server before
it will permit file transfers. FTP will use the user name and
password in the Operating System, if they are there. Logging into
FTP will set the user name and password in the OS (in the same
manner as the Alto Executive's "Login" command).
When you issue the "Login" command, FTP will first display the
existing user name known to the OS. If you now type a space, FTP
will prompt you for a password, whereas if you want to provide a
different user name, you should first type that name (which will
replace the previous one) followed by a space. The command may be
terminated by carriage return after entering the user name to omit
entering the password.
The parameters are not immediately checked for legality, but
rather are sent to the server for checking when the next file
transfer command is issued. If a command is refused by the server
because the name or password is incorrect, FTP will prompt you as
if you had issued the LOGIN command and then retry the transfer
request. Hitting delete in this context will abort the command.
A user name and password must be supplied when transferring files
to and from a Maxc system or an IFS. The Alto FTP Server requires
a user-password to be supplied if the server machine's disk is
password-protected and if the password in the server machine's OS
does not match the password on the disk. Thus if the OS was
booted and FTP invoked because a Request-for-Connection was
received (which bypasses password checking), FTP will refuse
access to files unless a password is supplied. However if the OS
was booted normally, FTP assumes that the disk owner (who knew the
password) will control access by using the server option switches.
The user-name is ignored.
Requests the FTP server to "connect" you to the specified
directory on the remote system, i.e., to give you owner-like
access to it. The password may be omitted by typing carriage
return after the directory name. As with LOGIN, these parameters
are not verified until the next transfer command is issued.
CONNECT cancels the effect of any previous DIRECTORY command. At
Alto Pup FTP December 12, 1981 7
present, the "Connect" command is meaningful only when
transferring files to or from a Maxc system or an IFS; the Alto
FTP server currently ignores connect requests. If the "multiple
directory" feature of the Alto Operating System ever comes into
widespread use, this may be changed.
Compares the contents of with a file in the
local file system. It tells you how long the files are if they
are identical or the byte position of the first mismatch if they
are not. FTP will suggest a local filename based on the name body
of . If you like this name, type Carriage
Return; if you wish to abort the compare command type Delete. If
you would like to compare against a local file by a different
name, type the new name. The old one will disappear, and you then
have the same three choices as before.
Causes to be used as the default remote directory
in data transfer commands (essentially it causes
to be attached to all remote filenames that do not explicitly
mention a directory). Specifying a default directory in no way
modifies your access privileges, whereas CONNECTing gives you
'owner access' (and usually requires a password). Explicitly
mentioning a directory in a file name overrides the default
directory, which overrides the connected directory, which
overrides the login directory. Punctuation separating from other parts of a remote filename should not be
included. For example you might type "Directory Alto" not
Initiates transfer of the specified remote file to the local host.
The syntax of must conform to the remote host's
file system name conventions. Before transferring a file, FTP
will suggest a local-filename (generally the same as the remote-
filename without directory or version), and will tell you whether
or not the file already exists on your local disk. At this point
you may make one of three choices:
1. Type Carriage Return to cause the data to be transferred to
the local filename.
2. Type Delete to indicate that the file is not to be
3. Type any desired local filename followed by Return. The
previous local filename will disappear, the new filename will
replace it, and FTP will tell you whether a file exists with
that name. This filename must conform to local conventions.
You now have the same three choices.
If the remote-filename designates multiple files (the remote host
permits "*" or some equivalent in file names), each file will be
transferred separately and FTP will ask you to make one of the
above three choies for each file. At present, only Maxc and IFS
support this capability. That is, you may supply "*"s in the
remote-filename when retrieving files from a Maxc or an IFS, but
not when retrieving files from another Alto.
Alto Pup FTP December 12, 1981 8
Initiates transfer of the specified local file to the remote host.
Alto file name conventions apply to the ; "*"
expansion is not supported. FTP will suggest a remote-filename to
which you should respond in a manner similar to that described
under RETRIEVE except that if you supply a different filename, it
must conform to the remote file system's conventions. The default
remote filename is one with the same name and extension as the
local file; the remote server defaults other fields as necessary.
If the remote host is a Maxc system or an IFS, then the directory
is that most recently supplied in LOGIN or CONNECT or DIRECTORY
commands and the version is the next higher.
Bundles together a group of files from the local file system into
a 'dump-format' file (see the Alto Executive documentation for the
dump-file format and more on dump-files in general) and stores the
result as . FTP will ask you for the names of
local files to include in the dump-file. Terminate the dump by
typing just when FTP asks for another filename. By
convention, files in dump-format have extension '.dm'.
Performs the inverse operation of DUMP, unbundling a dump-format
file from the remote file system and storing the constituent files
in the local file system. For each file in the dump-file, FTP
will suggest a local file name and tell you whether a file by that
name exists on your disk. You should respond in the manner
described under RETRIEVE.
Lists all files in the remote file system which correspond to
. The remote file designator must conform
to file naming conventions on the remote host, and may designate
multiple files if "*" expansion or some equivalent is supported
there. If the is terminated by rather than just a , FTP prints a prompt of "**"
at the left margin and prepares to accept one or more subcommands.
These subcommands request printout of additional information about
each file. To terminate subcommand input, type a in
response to the subcommand prompt. The subcommands are:
Type Print file type and byte size.
Length Print length of file in bytes.
Creation Print date of creation.
Write Print date of last write.
Read Print date of last read.
Times Print times as well as dates.
Author Print author (creator) of file.
Verbose Same as Type+Write+Read+Author.
Everything Print all information about the file.
This information is only as reliable as the Server that provided
it, and not all Servers provide all of these file properties.
Altos derive much of this information from hints, so do not be
alarmed if it is sometimes wrong.
Deletes from the remote filesystem. The syntax
Alto Pup FTP December 12, 1981 9
of the remote filename must conform to the remote host's file
system name conventions. After determining that the remote file
exists, FTP asks you to confirm your intention to delete it. If
the remote filename designates multiple files (the remote host
permits "*" or some equivalent in file names), FTP asks you to
confirm the deletion of each file.
Renames in the remote filesystem to be . The syntax of the two filenames must conform to the
remote host's file system name conventions, and each filename must
specify exactly one file.
Returns control to the Alto Executive, closing all open
Forces the data to be interpreted according to the specified , which may be TEXT or BINARY. Initially the type is
UNSPECIFIED, meaning that the source process should, if possible,
decide on the appropriate type based on local information.
Applicable only to files of type Binary, BYTE-SIZE specifies the
logical byte size of the data to be transferred. The default is
Applicable only to files of type Text, EOL specifies the End-of-
Line Convention to be used for transferring text files. The
values for are CR, CRLF, and TRANSPARENT. The
default is CR.
Causes to be used as the default device in data transfer
commands (essentially it causes to be attached to all
remote filenames that do not explicitly mention one). The
punctuation separating from the other components of a
remote filename should not be included. For example you might
specify "Device DSK" to Tenex, not "Device DSK:"
Causes to be used as the default version in data transfer
commands (essentially it causes the version string to be attached
to all remote filenames that do not explicitly mention one). The
punctuation separating the version information from other
components of a remote filename should not be included. For
example you might specify "Version 123", to IFS, not "Version
Allows you to toggle switches which control operation of the FTP
User. There is currently only one: DEBUG, which controls display
of protocol interactions. Warning: this printout (and the
corresponding one in the SERVER command below) sometimes includes
Alto Pup FTP December 12, 1981 10
Allows you to toggle switches which control operation of the FTP
Server. The switches are PROTECTED, OVERWRITE, KILL, and DEBUG,
corresponding to the global switches /P, /O, /K, and /D.
Allows you to toggle switches which control operation of the
Telnet. There is currently only one: CLOSE, which closes the
Telnet connection if one is open.
5. Command Line Syntax
The User FTP can also be controlled from the command line. As
explained above, the first token after the subsystem name and server
switches must be a legal host name; if the User FTP can't connect to
the FTP Server on that host it will abort and return control to the
Alto Executive. If a command list follows the host name, the command
line interpreter is invoked instead of the interactive keyboard
interpreter. This permits the full capabilities of the Alto Executive
(filename recognition, "*" expansion, command files, etc.) to be used
in constructing commands for FTP.
Each command is of the form:
To get a special character (any one of "*#';") past the Alto Executive,
it must be preceded by a single quote. To get a "/" into an FTP
argument, the "/" must be proceeded by two single quotes (the second
one tells FTP to treat the "/" as an ordinary character in the
argument, and the first one gets the second one past the Alto
Unambiguous abbreviations of command keywords (which in most cases
amount to the first letter) are legal. However, when constructing
command files, you should always spell commands in full, since the
uniqueness of abbreviations in the present version of FTP is not
guaranteed in future versions.
A command is distinguished from arguments to the previous command by
having a switch on it, so every command must have at least one switch.
The switch "/C" has no special meaning and should be used on commands
where no other switches are needed or desired.
5.1. Command Line Errors
Command line errors fall into three groups: syntax errors, file errors,
and connection errors. FTP can recover from some of these, though it
leaves the decision about whether to try up to you.
Syntax errors such as unrecognized commands or the wrong number of
arguments to a command cause FTP's command interpreter to get out of
sync with the command file. FTP can recover from syntax errors by
simply ignoring text until it encounters another command (i.e. another
token with a switch).
Alto Pup FTP December 12, 1981 11
File errors such as trying to retrieve a file which does not exist are
relatively harmless. FTP recovers from file errors by skipping the
Connection errors such as executing a store command when there is no
open connection could cause FTP to crash. FTP can't recover from
When FTP detects an error, it displays an error message in the User
window. If the error is fatal, FTP waits for you to type any character
and then aborts, causing the Alto Executive to flush the rest of the
command line, including any commands to invoke other subsytems after
FTP. If FTP can recover from the error, it asks you to confirm whether
you wish to continue. If you confirm, it plunges on, otherwise it
aborts. The confirmation request can be bypassed by invoking FTP with
the global error switch false (FTP/-E ...) in which case it will plunge
on after all non fatal errors. If you aren't around when an error
happens and you have told FTP to get confirmation before continuing
after an error, the remote Server will probably time out and close the
connection. If you then return and tell FTP to continue, it will get a
fatal connection error and abort.
5.2. Command Line Switches
Most commands take local switches. These switches have default values
which are used if the switch is not mentioned. Proceeding a switch
with a minus sign inverts its sense: Retrieve/-O means retrieve but
don't overwrite. While the interpretation of a switch sometimes
depends on the command, the general idea is:
Switch Default Function
/C -- [Command] null switch which tells the command line
parser that this token is a command.
/S false [Selective] the remote and local file names differ.
The LOAD command uses this switch slightly
/D update [Dates] show file creation dates.
/V false [Verify] request confirmation from the keyboard.
/O true [Overwrite] allow overwriting existing files.
Transfers may be conditioned upon comparison of the creation dates of
corresponding local and remote files. The comparison is