9.  Administration

This section indicates some events and files which must be administered for the uucp system. Some administration can be accomplished by shell files which can be initiated by crontab entries. Others will require manual intervention. Some sample shell files are given toward the end of this section.

SQFILE - sequence check file

This file is set up in the program directory and contains an entry for each remote system with which you agree to perform conversation sequence checks. The initial entry is just the system name of the remote system. The first conversation will add two items to the line, the conversation count, and the date/time of the most resent conversation. These items will be updated with each conversation. If a sequence check fails, the entry will have to be adjusted.

TM - temporary data files

These files are created in the spool directory while files are being copied from a remote machine. Their names have the form

TM.pid.ddd

where pid is a process-id and ddd is a sequential three digit number starting at zero for each invocation of uucico and incremented for each file received. After the entire remote file is received, the TM file is moved/copied to the requested destination. If processing is abnormally terminated or the move/copy fails, the file will remain in the spool directory.

The leftover files should be periodically removed; the uuclean program is useful in this regard. The command

uuclean -pTM

will remove all TM files older than three days.

LOG - log entry files

During execution of programs, individual LOG files are created in the spool directory with information about queued requests, calls to remote systems, execution of uux commands and file copy results. These files should be combined into the LOGFILE by using the uulog program. This program will put the new LOG files at the beginning of the existing LOGFILE. The command

uulog

will accomplish the merge. Options are available to print some or all the log entries after the files are merged. The LOGFILE should be removed periodically since it is copied each time new LOG entries are put into the file.

The LOG files are created initially with mode 0222. If the program which creates the file terminates normally, it changes the mode to 0666. Aborted runs may leave the files with mode 0222 and the uulog program will not read or remove them. To remove them, either use rm, uuclean, or change the mode to 0666 and let uulog merge them with the LOGFILE.

STST - system status files

These files are created in the spool directory by the uucico program. They contain information of failures such as login, dialup or sequence check and will contain a TALKING status when to machines are conversing. The form of the file name is

where sys is the remote system name.

For ordinary failures (dialup, login), the file will prevent repeated tries for about one hour. For sequence check failures, the file must be removed before any future attempts to converse with that remote system.

If the file is left due to an aborted run, it may contain a TALKING status. In this case, the file must be removed before a conversation is attempted.

LCK - lock files

Lock files are created for each device in use (e.g. automatic calling unit) and each system conversing. This prevents duplicate conversations and multiple attempts to use the same devices. The form of the lock file name is

LCK..str

where str is either a device or system name. The files may be left in the spool directory if runs abort. They will be ignored (reused) after a time of about 24 hours. When runs abort and calls are desired before the time limit, the lock files should be removed.

Shell Files

The uucp program will spool work and attempt to start the uucico program, but the starting of uucico will sometimes fail. (No devices available, login failures etc.). Therefore, the uucico program should be periodically started. The command to start uucico can be put in a ``shell'' file with a command to merge LOG files and started by a crontab entry on an hourly basis. The file could contain the commands

Note that the ``-r1'' option is required to start the uucico program in MASTER mode.

Another shell file may be set up on a daily basis to remove TM, ST and LCK files and C. or D. files for work which can not be accomplished for reasons like bad phone number, login changes etc. A shell file containing commands like

can be used. Note the ``-n12'' option causes the ST and LCK files older than 12 hours to be deleted. The absence of the ``-n'' option will use a three day time limit.

A daily or weekly shell should also be created to remove or save old LOGFILEs. A shell like

can be used.

Login Entry

One or more logins should be set up for uucp. Each of the ``/etc/passwd'' entries should have the ``program/uucico'' as the shell to be executed. The login directory is not used, but if the system has a special directory for use by the users for sending or receiving file, it should as the login entry. The various logins are used in conjunction with the USERFILE to restrict file access. Specifying the shell argument limits the login to the use of uucp ( uucico) only.

File Modes

It is suggested that the owner and file modes of various programs and files be set as follows.

The programs uucp, uux, uucico and uuxqt should be owned by the uucp login with the ``setuid'' bit set and only execute permissions (e.g. mode 04111). This will prevent outsiders from modifying the programs to get at a standard shell for the uucp logins.

The L.sys, SQFILE and the USERFILE which are put in the program directory should be owned by the uucp login and set with mode 0400.