unix

Unix Servers

General

Apache

General

When publishing a site containing the Message Board component to a Unix server, there are several different errors you can run into. These questions are designed to help pinpoint and resolve the error.

Correct permissions for the cgi-bin and message directories

The BBS requires that certain permissions are given to the cgi-bin and message directory:

  • bbs/cgi-bin directory
    The cgi-bin directory needs to have Read and Execute permissions given to all. This allows your viewers to access the directory and run the CGI scripts. You can give yourself, the owner of the directory all permissions.

    Go to the bbs/ directory and type in the following at the UNIX prompt:
         chmod 755 cgi-bin/
         chmod 755 cgi-bin/*    (changes permissions on all files in cgi-bin directory)
     
  • bbs/message directory
    The message directory needs to have Write and Execute permissions given to all. This allows your viewers to access the directory and run the CGI scripts. You can give yourself, the owner of the directory all permissions.

    Change directories to the bbs/ directory and type in the following at the UNIX prompt:
         chmod 733 message/
         chmod 733 message/*   (changes permissions on all files in message directory)

Perl path is running Perl5

The two CGI scripts that are used in the Message Board component are Perl5 scripts. You must have Perl5 installed and running on your server in order for these scripts to be interpreted properly. If you are not running Perl5 and you try to run the Message Board, you will get a Server Error.

To check the version of perl, you can use the flag -v. At the command prompt, type in the perl path followed by the flag:

                   /usr/bin/local/perl -v

The result will tell you the version information:

unix_versin

You are local publishing the site containing the BBS component

If you are locally publishing the site containing the BBS component, you will have difficulty. The cgi-bin/config file may or may not be published.  Required directories may or may  not be created. Permissions will be incorrectly given to the cgi-bin and message directories.  The creation of these files and folders seems to be intermittent at best on a local publish.

If the reason  you are locally publishing the site is to avoid uploading all of the generated HTML files to the server, there is another option. Create a new site file and place the Message Board component on the HOME page.  Configure the Message Board Properties palette with your server settings and publish the site to your remote webserver. You can then link to this BBS page in your larger site using an external link. By creating a  single page site file for the BBS component, you can republish the larger site repeatedly without having to manually reset the permissions for the BBS.  Also, doing a remote publish avoids the problems incurred  with a local publish.

Telnet Access to the Webserver

If you have telnet access to your webserver, you can run the following test to determine whether or not the scripts are executing properly:

  1. Log into your webserver
  2. Change directories so that you are in the cgi-bin directory
  3. At the UNIX prompt, type the following command:
    perl submit-bbs-form.cgi
    where perl is the path to the Perl5 executable (ie.  /usr/local/bin/perl)

The output of this command should be generated HTML. If you get see anything other than generated HTML, the scripts are not running correctly and the BBS will not work.

Specific directory for CGI scripts?

Fusion will place the Message Board CGI scripts in the bbs/cgi-bin directory.

If you are repeatedly getting errors and you know that the permissions and perl path are set correctly, you may want to check with the system administrator of the webserver to see if  there is a required directory for CGI scripts. Depending on how your webserver was configured, there may be a required directory that cgi scripts have to run from. If this is the case, then you will need to set the CGI-bin directory to point to this required directory.

Fusion 3.0 will allow you to customize the location of the CGI-bin directory but there are two restrictions:

  1. The directory must be in the publish root directory or lower.
    What this means is that if you are publishing to htdocs/ on your webserver, the cgi-bin directory must reside in or below the htdocs/ directory. You cannot set the CGI-bin directory to be ../cgi-bin.
     
  2. The directory must be a relative path.
    You cannot specify the CGI-bin directory to be something like C:/Programs/Scripts/cgi-bin. It must be a relative path pointing to the cgi-bin directory from the current  page. (ie bbs/cgi-bin)

Apache

Apache servers have gotten a reputation for being picky when it comes to the BBS. At this point, in addition to the General section above, you need to examine the following :

Initial permissions given to cgi-bin and message directories

When publishing to an Apache UNIX server, the initial permissions for these two directories needs to be set to at least 704 (-rwx---r--). This permission needs to be set prior to the first execution of the BBS. If not, the BBS will not work regardless of what permissions are given thereafter.

Publish the BBS to your webserver. Before viewing the site in a browser, log onto your webserver and check the permissions of the bbs/cgi-bin and bbs/message directory. If the permissions are set to at least 704 (-rwx---r--), then check to see if the correct permissions are given.

Click on New Message button and nothing happens.
No error messages occur.

If you look at the source code of the right frame of the BBS, you will notice that the generated source code is incomplete. The last lines shown are:

</script>
</HEAD>
<BODY bgcolor=#FFFFFF LINK=#FF0000 VLINK=#800080 ALINK=#800080>

To correct this, you need to log onto your webserver and give everyone read permissions for the files inside the message directory. The message directory itself needs to retain its permissions of 733 (read and write permissions). This is done with the commands:

chmod 733 message
chmod 744 message/*

Reload the Message Board page and click on the New Message button. You should see the form requesting your Name, Email, Subject and Message.

In rare cases, you will need to give everyone full permissions for the files inside the message directory. To do this, use the command:

chmod 777 message/*

Go Back to Previous Page

Have a question that you canīt find the answer to? Want to report a possible bug?

Send a help request to NetObjects Technical Support