Thomas Brunt's OutFront Hosting
 
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Installing and Using Perl Scripts - Part IV 
by Outfront Moderator Katherine Nolan (abbeyvet)

Setting Permissions and About CHMOD

This is the part of installing scripts that causes most angst for Newbies, so we will take a moment to look at the whole issue of file permissions before doing anything to our script.

You can give three levels of access to any file:

Read access:
The file can be read.
Write access:
The file can be written to
Execute access:
The file can be executed.

In the chmod system these levels of access are given numerical values as below:

Read access
= 4
Write access
= 2
Execute access
= 1

The levels of access allowed to any file is expressed as the sum of these values. Eg:

Read and Write:
4 + 2 = 6
Read Write and Execute:
4+2+1=7
Read and Execute:
4+1=5
.
.. and so on.

You can also allow different types of user different levels of access. The three types of users are 

Owner
Group 
Other

In general Group and Other can be taken to mean the world in general, the Owner is you - the person running the script and your server.

A permission of 755 would mean:

Owner:
Read, Write and Execute (4+2+1=7)
Group:
Read and Execute (4+1=5)
Other:
Read and Execute (4+1=5)

A permission of 644 would mean:

Owner:
Read and Write(4+2=6)
Group:
Read (4)
Other:
Read (4)

644 is in fact the default for HTML files - you can read them and write to them, your users can just read them.

 

Setting permissions for our Script

Setting permissions in WS_FTP is simple, just right click the file and you are presented with a dialogue box which allows you to tick off the relevant permissions.
Do this for each of the following files and directories in our script.

Poll_It_v2.05.cgi
Chmod 755, that is: 
Owner:
Read, write and Execute
Group and Other:
Read and Execute

Files in the pollit_files directory

1. All files ending in .html:
chmod 644, ie
Owner: Read and Write
Group and Other: Read

2. All files ending in .txt:
chmod 666, ie
Owner, Group and Other:
Read and Write

 

The moment of truth!

If you have followed along until this point your script should now be installed and functional.

Open this URL - replacing your own sites details obviously, or check out the poll running at my site first if you would like to see the script in action!:

http://www.inkkdesign.com/cgi-local/poll/Poll_It_v2.05.cgi

and you should see a message telling you there is no poll available. Open this URL and login using the password you specified to start creating one!

http://www.inkkdesign.com/cgi-local/poll/Poll_It_v2.05.cgi?load=login

Having Problems?

If you have any problems along the way with this installing this particular script please use the forums to ask questions, a thread was started specifically to deal with any issues that arose while following this tutorial, you may find the answer to your problem there.  

For general script problems it is best to look first at the site where you got the script, perhaps they have a forum or an FAQ page, or they may provide email support.

Having said that the most common problems that arise in relation to scripts are:

  • Incorrect file names or file paths.
    Remember that Unix servers are case sensitive - make sure you have named all files and folders properly.

  • Incorrect Permissions
    Read the section on setting permissions above and double check that you have everything right

  • Incorrect Path to Perl
    Are you sure you configured this correctly for your server?

 

In the final part of this tutorial we will have a look at customizing this script to suit the appearance and structure of your site.

 

<< Part IV: Configuring and Installing Your Script
>> Part V: Customizing the Script for Your Site


Fun With Background Images
Fun With Bulleted Lists
Are You Compliant?
Introduction To Cascading Style Sheets
Creating Custom Error Pages
Designing Fast Loading Sites
Creating Funky Forms With CSS
htaccess Magic
An Introduction To JavaScript
JavaScript Snippets
Getting More From Mailto
Installing And Using Perl Scripts
Preparing Photos For Your Web Site
The Popup Dilemma
Paint Shop Pro Album 4
Creating And Using robots.txt File
Creating JavaScript Rollover Buttons