.TH UUCP "" "" Overview
.PC "Unattended communication with remote systems"
.PP
.I UUCP
stands for
``\*(UN to \*(UN communications protocol''.
It is a system of commands that allows you to exchange files with other
\*(CO or \*(UN systems, in an unattended manner.
With \*(UU, you can send mail to other systems, upload files, and execute
commands.
When configured correctly, \*(UU also lets other users upload files to
your system, copy files from it, and execute commands.
All this can be done without your having to sit at your console and
type commands; thus, files can be transferred in the small hours,
when telephone rates are lower and computers are relatively free.
.PP
\*(UU gives you access to the Usenet, a nation-wide network of \*(UN and
\*(CO users.
Access to the Usenet will let you exchange mail with any of the thousands
of Usenet users, receive mail from them, download source code for many
useful programs, and read the latest news on a host of subjects.
For details on contacting UUNET, a commercially accessible Usenet site,
enter the command:
.DM
	phone uunet
.DE
.SH "Implementation of UUCP"
Beginning with release 4.2, \*(CO implements the Taylor \*(UU package.
The current implementation is Taylor \*(UU version 1.05.
Taylor \*(UU offers extraordinary flexibility, beyond that offered by
standard implementations of \*(UU.
The following Lexicon entries describe \*(UU:
.LB
\fBconfig\fR	Overall configuration file for \*(UU
\fBcu\fR	Introduce the \fBcu\fR communications utility
\fBdial\fR	Describe how \fBuucico\fR and \fBcu\fR can dial a modem
\fBdomain\fR	Describe the file that names your \*(UU domain
\fBport\fR	File that describes ports through which \*(UU dials
\fBsys\fR	File that describes systems contacted by \*(UU
\fBuuchk\fR	Check \*(UU configuation
\fBuucico\fR	Daemon that controls communication with a remote site
\fBuuconv\fR	Convert UUCP configuration files to Taylor format
\fBuucp\fR	Spool files for transmission to other systems
\fBuucpname\fR	File that names your system
\fBuudecode\fR	Decode a binary file sent from a remote system
\fBuuencode\fR	Encode a binary file for transmission
\fBuuinstall\fR	Install or modify \*(UU
\fBuulog\fR	Read a \*(UU log
\fBuumkdir\fR	Create a \*(UU directory
\fBuumvlog\fR	Archive \*(UU log files
\fBuuname\fR	List \*(UU names of known systems
\fBuupick\fR	Pick up a file uploaded from a remote system
\fBuurmlock\fR	Remove a \*(UU lockfile
\fBuusched\fR	Call all systems that have jobs waiting for them
\fBuustat\fR	Display and modify the status of a UUCP job
\fBuuto\fR	Send a file to a remote system
\fBuutouch\fR	Touch a file to trigger \fBuucico\fR poll
\fBuutry\fR	Debugging tool for \*(UU
\fBuux\fR	Execute a command on a remote system
\fBuuxqt\fR	Execute commands requested by a remote system
.SH "Files and Directories"
\*(UU uses the following files and directories:
.IP \fB/usr/lib/uucp/sys\fR
This file contains information about remote \*(UU sites with which you
can communicate.
.B uucico
uses its information to connect to remote systems;
sets permissions for the directories that a given remote system can
write into or read from;
establishes the protocol (or protocols) that can
be used when communicating with the given remote system to transfer files.
.IP \fB/usr/lib/uucp\fR
.II /usr/lib/uucp
This directory holds many of the \*(UU executables.
It also holds the following configuration files:
.RS
.IP \fB/usr/lib/uucp/config\fR
.II /usr/lib/uucp/config
.II config
Customize the configuratio of Taylor \*(UU.
Note that this file is not shipped with \*(CO, to ensure that the
default configuration is used; however, you can write one yourself
easily enough.
For details, see the Lexicon entry
.BR config .
.IP \fB/usr/lib/uucp/dial\fR
.II /usr/lib/uucp/dial
.II dial
.B uucico
uses the information in this file to communicate with modems.
.IP \fB/usr/lib/uucp/port\fR
.II /usr/lib/uucp/port
.II port
.B uucico
uses the information in this file
to communicate with a given port on your system.
.RE
.IP \fB/usr/spool/uucp\fR
.II /usr/spool/uucp
This directory holds log files and spool directories, as follows:
.RS
.IP \fB/usr/spool/uucp/.Admin\fR
.II/usr/spool/uucp/.Admin
.II .Admin
This directory holds the following administrative logging files:
.RS
.IP \fB/usr/spool/uucp/.Admin/xferstats\fR
.II /usr/spool/uucp/.Admin/xferstats
.II xferstats
This file holds statistics about the rate at which data were transferred
between your site and a remote site.
.IP \fB/usr/spool/uucp/.Admin/audit.local\fR
.II /usr/spool/uucp/.Admin/audit.local
.II audit.local
This file holds auditing information, as generated using the option
.B \-x
with any \*(UU command.
.RE
.IP \fB/usr/lib/uucp/.Log\fR
.II /usr/lib/uucp/.Log
.II .Log
This directory holds information that detail the files transferred between
your system and any remote system.
It contains one sub-directory for each \*(UU command \(em
one each for
.BR uucico ,
.BR uucp ,
.BR uux ,
and
.BR uuxqt .
Each sub-directory, in turn, contains one log file for each remote system
with which your system exchanges files, plus the file
.BR ANY ,
which holds information about all remote systems.
For example, file
.B /usr/spool/uucp/.Log/uucp/lepanto
logs every file that you have exchange with remote site
.B lepanto
via the command
.BR uucp .
.IP \fB/usr/spool/uucp/.Received\fR
.II /usr/spool/uucp/.Received
.II .Received
This directory contains one sub-directory for each remote system with which
your system exchanges files.
It holds files received from that system that cannot be executed properly.
If your system is configured correctly, this directory should be empty.
.IP \fB/usr/spool/uucp/.Sequence\fR
.II /usr/spool/uucp/.Sequence
.II .Sequence
This directory holds one file for each remote system with which you exchange
files.
The file holds a string from which the job most recently performed with that
site was named.
This sequence number is used to identify each job uniquely.
This is discussed in more detail below.
.IP \fB/usr/spool/uucp/.Status\fR
.II /usr/spool/uucp/.Status
.II .Status
This directory holds one file for each system with your system communicates
via \*(UU.
The file holds information about the status with which the last contact
exited.
For example, if your system communicated successfully with system
.BR mwc ,
then file
.B /usr/spool/uucp/.Status/mwc
will hold an entry that resembles the following:
.DM
	0 0 778536664 0 SUCCESSFUL mwc
.DE
.IP
However, if your system communicates with system
.B sales
and the last session failed during handshake, then file
.B /usr/spool/uucp/.Status/sales
will hold something like the following:
.DM
	4 7 769981110 4200 Handshake failed sales
.DE
.IP
Note that if a
.B .Status
file indicates that the last contact failed,
.B uucico
may silently refuse to dial out to that system; \*(UU is designed this way,
in order to spare you the expense of repeatedly calling a system whose
connection is damaged in some way.
The solution is simply to remove the file in question.
For example, if
.B uucico
refuses to dial system
.B mwc
and you know that that system is working correctly, try removing file
.BR /usr/spool/uucp/.Status/mwc .
.IP \fB/usr/spool/uucp/.Temp\fR
.II /usr/spool/uucp/.Temp
.II .Temp
This directory holds one directory for each system with which your system
has exchanged files.
Each sub-directory holds temporary files used by the jobs being performed
for that system.
.IP \fB/usr/spool/uucp/.Xqtdir\fR
.II /usr/spool/uucp/.Xqtdir
.II .Xqtdir
The command
.B uuxqt
executes from within this directory all commands that have been spooled onto
your system for execution.
It also copies into this directory all files on remote systems
that a spooled command names.
Note that files reside here only briefly.
.IP \fB/usr/spool/uucp/\fIsitename\fR
This directory holds all files being uploaded to site
.IR sitename .
Each file is constructed as follows:
.RS
.IP \fBprefix\fR
This is either
.B D.
or
.BR C. .
The former indicates a data file, and the latter a command file (that is,
a file to be executed on the remote system by command
.BR uux ).
.IP \fIsite\fR
The name of the site to which the file is being uploaded.
.IP \fIsequence_number\fR
This is a unique number, meant to ensure that no \*(UU file clobbers another.
When \*(UU is spooling a file to be transmitted to a remote site, it looks in
that site's
.B .Sequence
file, increases the sequence number by one, uses that number to name the file,
and writes the incremented sequence number back into the site's
.B .Sequence
file.
.RE
.IP \fB/usr/spool/uucp/LCK..*\fR
.II "lock files"
.II LCK..
Finally, files that begin with the string
.B LCK..
are lock files.
\*(UU (and many other \*(CO programs) use them to lock devices, to ensure
that only one program can access a device at a time.
Each lock file contains the process identifier
of the process that has locked that device, but different programs use
different conventions in naming lock files.
.IP
Programs that log users into your system lock console and terminal devices.
These programs use lock files whose names are built from
the major-device number and the minor-device
number of the device being locked
For example, file
.B /usr/spool/uucppublic/LCK..2.1
locks the device with major number 2 and minor number 1 \(em that is,
the color virtual-console device
.BR /dev/color1 .
Looking into file
.BR LCK..2.1 ,
we see the number 6836; and when we use the command
.B "ps -alx"
to look for a process with this identifier, we see the following
.DM
	color1   6836     1     fred  133 6001 w           ksh
	color1   8923  6836     fred  204 6001 S  ttywait  me
.DE
.IP
That is, user
.B fred
has logged into this system via device
.B /dev/color1
and invoked a shell that has process identifier
.BR 6836 .
.IP
Second, when \*(UU opens a port to dial out, it creates a lock file
whose name includes the name of the port on which it is dialing.
For example, if \*(UU is dialing out via port
.BR /dev/com3fl ,
it creates file
.B LCK..com3fl
in
.BR /usr/spool/uucp .
This helps to stop two \*(UU process from each trying to open the same
port at the same time.
.IP
Finally, when \*(UU dials a given remote site, it creates a lock file
for that site.
For example, if \*(UU dials site
.BR mwc ,
it creates lock file
.B LCK..mwc
in directory
.BR /usr/spool/uucp .
This help to prevent two different \*(UU processes from attempting to dial
the same site at the same time.
.PP
This concludes our discussion of \*(UU's files and directories.
For more information, see the Lexicon entries
.BR config ,
.BR dial ,
.BR port ,
and
.BR sys .
.SH Permissions
The following gives the correct permissions and ownership for the files
that comprise the \*(UU system:
.DM
	-rw-------  uucp   uucp  /usr/lib/uucp/dial
	-rw-------  uucp   uucp  /usr/lib/uucp/port
	-rw-------  uucp   uucp  /usr/lib/uucp/sys
	-r-sr-xr-x  uucp   root  /usr/lib/uucp/uucico
	-rwxr-xr-x  uucp   root  /usr/lib/uucp/uuconv
	-r-s--s--x  root   root  /usr/lib/uucp/uumkdir
	-r-xr-xr-x  uucp   uucp  /usr/lib/uucp/uumvlog
	-r-xr-xr-x  uucp   uucp  /usr/lib/uucp/uurmlock
	-r-xr-xr-x  root   root  /usr/lib/uucp/uusched
	-r-s--s--x  uucp   uucp  /usr/lib/uucp/uutouch
	-r-x------  uucp   uucp  /usr/lib/uucp/uutry
	-r-sr-xr-x  uucp   root  /usr/lib/uucp/uuxqt
	-r-s--s--x  uucp   uucp  /usr/bin/uucheck
	-r-sr-xr-x  uucp   root  /usr/bin/uucp
	-r-x--x--x  bin    bin   /usr/bin/uudecode
	-r-x--x--x  bin    bin   /usr/bin/uuencode
	-r-s--s---  uucp   uucp  /usr/bin/uuinstall
	-rwxr-xr-x  root   root  /usr/bin/uulog
	-r-sr-xr-x  uucp   root  /usr/bin/uuname
	-rwxr-xr-x  root   root  /usr/bin/uupick
	-r-sr-xr-x  uucp   root  /usr/bin/uustat
	-r-xr-xr-x  root   root  /usr/bin/uuto
	-r-sr-xr-x  uucp   root  /usr/bin/uux
.DE
.PP
Permissions should be set properly by \*(CO when you installed it
on your computer.
However, if problems arise with \*(UU, be sure to check that
permissions are correct.
If permissions have somehow been reset incorrectly, \*(UU will not work
because much of its work depends upon its being able to create and delete
files in certain restricted directories.
.PP
.II chmod
Should a file's permissions be ``stepped on'' for whatever
reason, use the command
.B chmod
to restore them.
Likewise, should the group or user who ``owns'' a file or directory
be changed for whatever reason, you (or, to be more exact, the superuser
.B root )
can use the commands
.B chgrp
and
.B chown
to restore proper ownership.
For details on how to use these commands, see their entry in the Lexicon.
.SH "Debugging UUCP Problems"
For information how to debug and solve common problems with UUCP,
see the tutorial on UUCP that appears in the front half of this manual.
.SH "See Also"
.B
asy,
commands,
config,
cu,
dial,
domain,
modem,
mwcbbs,
port,
sys,
terminal,
uuchk,
uucico,
uuconv,
uucp,
uucpname,
uudecode,
uuencode,
uuinstall,
uulog,
uumkdir,
uumvlog,
uuname,
uupick,
uurmlock,
uusched,
uustat,
uuto,
uutouch,
uutry,
uux,
uuxqt
.R
.br
\fIUUCP, Remote Communications Utility\fR, tutorial
.SH Notes
The Lexicon entry
.B mail
gives directions on how to send mail to users on popular commercial
networks.
.PP
For information on how to hook up a Trailblazer modem to run \*(UU,
see the Lexicon entry for
.BR modem .
.PP
.II "Taylor, Ian Lance"
The \*(CO implementation of \*(UU
was written by Ian Lance Taylor (ian@airs.com).
.II "Chalmers, Robert"
It was ported to \*(CO by Robert Chalmers (earth@nanguo.cstpl.com.au).
For information on copyright and availablity of source code, see the
documentation included in file
.BR /usr/src/alien/uudoc.tar.Z .
