Go to the first, previous, next, last section, table of contents.


3 GDT Distribution System

3.1 Overview

The following summarizes the operations involved in the downloading process.

The first time an user requests the URL http://www.dia.uniroma3.it/cgi-bin/gdt/download-cgi.pl, the gateway program recognize a first access (from the lack of parameters) and replies with a form the user is asked to fill-in. After the user submittal, an html page is sent back to him (for thanks and other stuff). The chosen package is attached to an e-mail and sent immediately to the e-mail address specified in the form.
Meanwhile a log file is updated with information about the date, the remote host accessing, and the form field as filled in by the user.

3.2 Changing the gateway configuration

Configuration files allow to:

The following few sections are devoted to the above tasks. Other tasks (including troubleshooting) are more difficult to treat.

3.2.1 Adding a packet to the available packets

First place the new packet in the directory `~gdt/public/cgi-bin/files'. Then the file `~gdt/public/cgi-bin/corrispondences' and add two lines: the first containing a short description of the packet, the second the name of the file to be attached to the reply-mail when such an item is selected by the user.

3.2.2 Removing a packet from the available packets

Edit the file `~gdt/public/cgi-bin/corrispondences' and remove the two lines corresponding to the item to the packet you want to make unavailable.

3.2.3 Modifying the html request form

Edit the file `~gdt/public/cgi-bin/form.html'.
Note that the following token must appear on a line by itself:
<!--INSERT_SELECT_ITEMS_HERE-->
between the html markups <select> and </select>.
The <!--INSERT_SELECT_ITEMS_HERE--> token is a placeholder that will be automatically replaced with the correct <option> markups (derived from the `~gdt/public/cgi-bin/corrispondences' file) when the html form page is sent back to the user.

3.2.4 Modifying the reply-mail

Simply edit the file `~gdt/public/cgi-bin/reply.mail'.
The following placeholders may be used:

3.2.5 Modifying the reply html page

Simply edit the file `~gdt/public/cgi-bin/reply.html'.
The following placeholders may be used:

3.3 Troubleshooting

3.3.1 Possible failures

In the following a list of possible failures is given to help the debugging phase.

  1. The cgi-bin hangs and doesn't reply the reply html page nor the reply mail.
    Perhaps the web server www.dia.uniroma3.it hasn't enough disk space to send the mail.
    To verify this hypothesis, login on the server, try the command `df -k', and look the disk space available for the directory /var (the culprit is the `/var/spool/mqueue/' directory, where the mail queue is). If the disk space is very small you can free it by: To see how many mails are in the mail queue you can issue the command `mailq' (you need not to be root).

3.3.2 Possible errors

Errors are changes in the system status that lead to failures when the appropriate function is used. Here errors (and not the corresponding failures) are listed, for it is easier to signal wrong configurations rather that try to figure out which failure will show up first.
If some unexplicable failure turns up, then tick out the list below.

  1. The gateway program must be an executable file
    Execute `ls -F' on the `~gdt/public/cgi-bin' directory. You should see a `*' at the end of the `download-cgi.pl' and `base64.pl' files.
    If not issue the command `chmod a+x download-cgi.pl base64.pl'.
  2. The gateway directory must have the correct AFS privileges
    In order to be launched by the `httpd' daemon, the cgi program must be in a directory whose AFS access control list is set in such a way that user `system:anyuser' has reading privileges.
    Verify this simply by changing to the `~gdt/public/cgi-bin/' directory and issuing the command:
    `fs sa . system:anyuser rl'.
    Note: AFS execute privileges (`x') are not needed because a perl program can be executed if it can be read.


Go to the first, previous, next, last section, table of contents.