-->
Previous Table of Contents Next


Permissions for file transfers are a little more convoluted with HDB UUCP than Taylor UUCP because HDB UUCP adds many features for special handling. Instead of looking at all the file transfer permissions, you are better off consulting a specialty book on UUCP because the subject can easily consume 100 pages by itself! For this reason, we’ll look at the fundamentals—just enough to get you set up properly.

Permissions for remote system access and file transfers are handled by the file /usr/lib/uucp/Permissions. The general format of the entries in this file is


MACHINE=remotename LOGNAME=uucp \

     COMMANDS=rmail:rnews:uucp \

     READ=/usr/spool/uucppublic:/usr/tmp \

     WRITE=/usr/spool/uucppublic:/usr/tmp \

     SENDFILES=yes REQUEST=no

MACHINE identifies the remote machine’s name, LOGNAME is the name they use to log in (or you use to log in to their system), COMMANDS are the commands they can execute on your local system, READ is the list of directories they can read files from, WRITE is the list of directories where they can write files, SENDFILES means they can send files (yes or no), and REQUEST means they can request files from your system (yes or no). Notice the use of slashes at the end of the first four lines to indicate this is really a single long line broken up for readability. This is a typical UNIX convention.

A complete entry for the remote system wizard shows that it is allowed to both send and receive files but only from the /usr/spool/uucppublic directory, and it can only execute mail and uucp commands (the latter transfers files):


MACHINE=wizard LOGNAME=uucp1 \

     COMMANDS=rmail: uucp \

     READ=/usr/spool/uucppublic: \

     WRITE=/usr/spool/uucppublic: \

     SENDFILES=yes REQUEST=yes

To prevent the remote system from sending files, change SENDFILES to no. To prevent the remote system from requesting files, change REQUEST to no.

A UUCP Connection

When UUCP connects to a remote machine, it follows a particular series of steps. You can better understand the configuration files used by UUCP and the processes that are involved by following through a typical session. UUCP uses a process called uucico (UUCP Call In/Call Out) to handle the process of connecting and sending information. A UUCP connection can be started with the uucico command followed by the remote system name, such as


uucico -s arthur

When uucico starts, it examines the /usr/lib/uucp/sys file (Taylor UUCP) or /usr/lib/uucp/Systems (HDB UUCP) to see if the remote system name exists there. When it finds the proper remote system name, uucico reads the rest of the entries for that system, including the port to be used. From there, uucico uses /usr/lib/uucp/port and /usr/lib/uucp/dial (Taylor UUCP) or /usr/lib/uucp/Devices and /usr/lib/uucp/Dialers (HDB UUCP) to start the modem connection (assuming it is a modem used to establish the session, of course). When the modem is in use, uucico creates a lock on the device so no other application can use it (the lock is a file starting with LCK.. and followed by the device name, such as LCK..cua0).

Once the chat scripts for setting up and dialing the modem have been executed and the remote system is connected, uucico uses the chat script in the /usr/lib/uucp/sys or /usr/lib/uucp/Systems file to log in to the remote. Once logged in, the remote machine starts its copy of uucico, and the two uucico processes establish handshaking between themselves. Finally, after the handshaking has been established, uucico goes ahead and handles any transfers that are queued.

When completed with the session, the local machine checks to make sure that the remote has nothing further to send and then breaks the connection. Finally, uucico terminates.

Direct Connections

If your two machines are directly connected through a serial port, for example (no modems involved in the connection), you can use UUCP as a simple network protocol for file transfer. The only changes to the configuration files mentioned earlier are in the port specification. Instead of using a modem device, you specify a direct connection. For example, in the /usr/lib/uucp/sys file (Taylor UUCP), create an entry like this:


port    direct1

Include a matching entry in the /usr/lib/uucp/port file that looks like this:


port    direct1

type   direct

speed   38400

device   /dev/cua1

Specify the speed of the direct connection and the port which uses it. The entries in the HDB UUCP version are similar, using the /usr/lib/uucp/Systems and /usr/lib/uucp/Devices files.


Previous Table of Contents Next