2.1. Configuration Problems
Most Interchange configuration and setup problems are due to one of the following:
Wrong information given to makecat program.
This is by far the most common problem. To install a working demo, Interchange needs to know what the DocumentRoot is and how to run CGI programs. Details of this setup are server- and site-specific, which may require some research.
Re-run the configuration again, and pay close attention to the prompts given. There are examples given which apply to most systems.
If the web server is Apache or NCSA, Interchange will try and parse its httpd.conf file to help you along, but many ISPs don't allow users to read these and it may fail.
Too-low version of Perl.
If you have a Perl earlier than 5.005, Interchange will not work. Don't even try an earlier version.
Perl compiled with USE_THREADS.
Run perl -V. If you see -DUSE_THREADS in the compilation definition, you might run into problems with Interchange.
NOTE: You cannot run the Interchange software as root.
If you are setting Interchange up for the entire machine, and not just as a virtual host user, it is usual to create a special interch user to run the daemon and the link program. This means the directory listing for your cgi-bin should be something like:
-rwsr-xr-x 1 interchange users 6312 Dec 30 11:39 cgi-bin/simple
and for the socket file it should be:
srw------- 1 interchange users 0 Dec 30 11:41 etc/socket
Once you have set up the software, you can easily install catalogs as root as long as your umask is set to 2 or 22.
(The following assumes you have made the Interchange software owned and run by the special user interchange and that each user has a Interchange catalogs directory /home/user/catalogs).
The best way to set permissions on a multi-user system is to make all files group readable and writable (660 or 664 mode). If you have a system setup that places each user in their own group, make interchange a member of each user's group and set ownership and permissions with:
find /home/user/catalogs -print | xargs chown user find /home/user/catalogs -print | xargs chgrp user find /home/user/catalogs -print | xargs chmod g+rw
For best results, set the user's default umask to 2, so that they will, by default, create files that have the proper permissions. If you have all users in the same group, the above is not secure. You should put interchange in a group of which no user is a member (perhaps interchange would be a good choice) and set all files owned by the group interchange and all directories to mode 2770:
This will make files default to the proper group when created (on most UNIX versions, anyway).
find /home/user/catalogs -print | xargs chown user find /home/user/catalogs -print | xargs chgrp interchange find /home/user/catalogs -print | xargs chmod g+rw find /home/user/catalogs -type d -print | xargs chmod g+s
If you are on a virtual hosting system, the procedure varies. Making the program setuid should work for most systems. If your setup uses CGI-WRAP or another setuid scheme, it should still work. However, you may have to unset the setuid bit with chmod u-s cgi-bin/simple or the like. If you have a non-standard CGI setup, as some virtual host systems do, you will need to know something about UNIX and the web or engage a consultant to properly set up the paths. Usually switching to TLINK/INET mode is the easiest thing to do, though with Iserver and a few others it may take more than that.
If you used the makecat program to build the catalog, it should have warned you if it was not able to make the link program setuid. To set the program (in the file cgi-bin/simple in this example) to be setuid, use the command:
chmod u+s cgi-bin/simple