mhonarc-users

Fix for X rights on archive for Apache Virtual includesn

2000-05-16 13:50:14
Please include the following information in your message:

  Version of Perl (can be retrievied by "perl -v").

This is perl, version 5.004_04 built for alpha-dec_osf

  Version of the program (can be retrievied by "mhonarc -v").

  MHonArc v2.4.6 (Perl 5.00404)

  The operating system you are using (on Unix the output of "uname -a"
is useful).

OSF1 ratatosk.pdc.kth.se V4.0 1091 alpha

  The exact command-line used to invoke the program.

pdc-announce: "|/usr/local/vol/mhonarc-2.4.6/bin/mhonarc -afs -add
-quiet -outdir /afs/pdc.kth.se/public/www/news/maillists
/archive/pdc-announce/", "|/var/spool/joxmail/listar/listar -s
pdc-announce"

  Error/diagnostic messages from the program.

None.

  Any other information that might prove useful (eg. input files,
resource files, environment settings, etc).

We run apache-1.3.11 and use the virtual include facility in our HTML,
for example:

<!--#include virtual="index-plain.html"-->

For this facility to work, the file that contains the line above must
have X rights, for example, if that file is index.html, then:

-r-xr--r--    1 mike     usr          740 May 10 16:46 index.html

If not, the file index-plain will not be included by apache.
Unfortunately, mhonarc has no facility for setting X rights.  UMASK
can't set it, so we were forced to update the code as described in the
attached file (readme.PDC).  These three fixes solved the problem, so we
suggest they be incorporated into mhonarc.

Sincerely,
Mike Hammill
Center for Parallel Computers
Royal Institute of Technology
Stockholm, Sweden
<mike(_at_)pdc(_dot_)kth(_dot_)se>


Site-specific changes by PDC staff

The following three modifications were made in order to turn on the x
bit on generated files so that server-side Web includes would work. 

(1) The file lib/site_perl/mhamain.pl was modified by 
Harald Barth 11 May 2000 20:27:15 as follows:

After the block of code:

    close($msghandle)  if (!$SINGLE);
    if ($adding) {
        close($msginfh);
        #&file_remove($tmppathname);
    }
    &file_rename($tmppathname, $filepathname)  unless $SINGLE;

the following was added on line 1192:

    chmod (0755,$filepathname) unless $SINGLE;

(2) The file lib/site_perl/mhindex.pl was modified by
Nils Smeds on 11 May 2000 at 20:54 as follows:

After the block of code:

        ## Open/create index file
        if ($IDXONLY) {
           $outhandle = 'STDOUT';

        } else {
            if ($ADD && &file_exists($IDXPATHNAME)) {
                $tmpfile = join($DIRSEP, $OUTDIR, "tmp.$$");
                &file_rename($IDXPATHNAME, $tmpfile);
                ($mlinfh = &file_open($tmpfile))
                    || die("ERROR: Unable to open $tmpfile\n");
                $MLCP = 1;
            }
            ($outhandle = &file_create($IDXPATHNAME, $GzipFiles)) ||
                die("ERROR: Unable to create $IDXPATHNAME\n");
        }
        print STDOUT "Writing $IDXPATHNAME ...\n"  unless $QUIET;
        ## Added by Nils Smeds on 11 May 2000 at 20:54 (see readme.PDC)

the following was added on line 100:

        chmod(0755,$IDXPATHNAME);

(3) The file lib/site_perl/mhthread.pl was modified by
Nils Smeds on 11 May 2000 at 20:54 as follows:

        if ($IDXONLY) {
            $handle = 'STDOUT';
        } else {
            ($handle = &file_create($TIDXPATHNAME, $GzipFiles)) ||
                die("ERROR: Unable to create $TIDXPATHNAME\n");
        }
        print STDOUT "Writing $TIDXPATHNAME ...\n"  unless $QUIET;
        ## Added by Nils Smeds on 11 May 2000 at 20:54 (see readme.PDC)

The following was added on line 96:

        chmod(0755,$TIDXPATHNAME);

Documenter: Mike Hammill
<Prev in Thread] Current Thread [Next in Thread>
  • Fix for X rights on archive for Apache Virtual includesn, Mike Hammill <=