Domain Registration from
Domain Registration from


CGI,Perl,Sendmail Paths

What is the path to sendmail?

The path to sendmail is /usr/sbin/sendmail.

What is the path to FormMail?

The path to formmail is: /cgi-sys/FormMail.cgi

What is the path to my Web Accessible Folder?

The path is: /home/USERNAME/public_html/ , Replace USERNAME with your login name.

What is the path to perl?

The path to perl is: /usr/bin/perl.

What is the path to my cgi-bin?

The path to your cgi-bin is: /home/USERNAME/public_html/cgi-bin , Replace USERNAME with your login name.

What is the path to my subdomains cgi-bin?

The path is: /home/USERNAME/public_html/SUBDOMAIN/cgi-bin , Replace USERNAME with your login name, and SUBDOMAIN with the part of the subdomain.

What Perl Modules Are Installed?

To find out what perl modules are installed goto: http://YOURDOMAIN.COM/cgi-sys/perldiver.cgi , replace with your domain name or IP

Will Real Web Host install Perl Modules for me?

Yes, we will make an effort to install anything you need on the servers if it does not adversly affect other customers.

What scripts are preinstalled?

Preinstalled CGI · Random Html Generator – random text for pages · Guest Book – Users can sign a guest book; those who come and visit your site. · Counter – Add a hit counter on your web page to track how many people are going to your site and display on your web page. · Clock – Add a clock to your site. · Countdown – Add a countdown timer to your site to “countdown to special events. · Cgiemail – This is a Cgi script to allow forms to work in the web browser. · FormMail-clone – Another way to activate forms in the web browser. · EntropySearch – A built-in search engine for your web site. This will add searchable pages within your site. Visitors can now search your site for your products or words in a web page.

How do I access my pre-installed scripts?

Log into your control panel and click on CGI Scripts.

Common Errors in CGI Scripts

Troubleshooting CGI-bin Problems Below are solutions to some of the more common CGI script problems. When I activate my CGI program, I get back a page that says "Internal server error. The server encountered an internal error or mis-configuration and was unable to complete your request." This is generally caused by a problem within the script. Check your script settings again to see that you have entered the correct server information and have set the correct permissions for the script. If this information is correct, you'll need to contact whoever wrote or is distributing the script for further assistance. I am being told "File Not Found," or "No Such File or Directory." Upload your Perl or CGI scripts in ASCII mode, not binary mode. When I test my Perl script in local mode (by Telnet), I have the following error: "Literal @domain now requires a back slash at line 3, within string. Execution of aborted due to compilation errors." This is caused by a misinterpretation by Perl. You see, the "@" sign has a special meaning in Perl. It identifies an array (a table of elements). Since it cannot find the array named domain, it generates an error. You should place a back slash () before the "@" symbol to tell Perl to see it as a regular symbol, as in an email address. I am getting the message "POST not implemented." You are probably using the wrong reference for cgiemail. Use the reference /cgi-bin/ cgiemail/mail.txt. Another possibility is that you are pointing to a cgi-bin script that you have not put in your cgi-bin directory. In general, this message really means that the web server is not recognizing the cgi-bin script you are calling as a program. It thinks it is a regular type of file.

How To chmod Files?

So you have found the coolest CGI script to add to your already cool web site. You upload the new script to your site. With the excitement building, you test it out. Instead of seeing the output of the script, you get 500 - Server Error. What is wrong? You were told it would work with your web hosting provider. The major culprit is that you did not set the file permissions for your new script correctly. You look at the readme file the came with the script and it states you that you must change the permission set on one file to 655, others to 755. What does it all mean?

The purpose of the tutorial is about how to set UNIX file permissions and how it exactly works.

UNIX file permissions, or more commonly known as "Chmoding", is a set of permissions used by the UNIX/Linux operating systems which controls who and what will have access to files on your site. Chmoding is used in both restricting access to certain files and setting the permissions so a CGI program may perform the task it was programmed to do. There are only three levels of permissions on the UNIX/Linux OS.

They are the permission to:

(r) Read,
(w) Write and

(x) Execute files or programs.

With these three permissions there are three groups in which they apply to. The three groups are:

Group and
Other or also known as world.

The owner applies to who actually owns the files (your account). The group applies to the GID or the Group ID Number of the server you are on (everyone on your server) and Others or World applies to everyone else. Each group must have its access properly set for the file to be used and accessed.

These permissions allow the script to be able to run and edit or create the files it needs to do its operation. Chmoding is also useful if you wish to restrict outside web access to certain directories or if you wish to set a file to where no one but you can access and modify it.

As I said earlier, there are three types of access; read (r), write (w) and execute (x). In order to easily set these permissions, each permission is assigned a number.

Here is a chart of the permission numbers:

r (read) w (write) x (execute)
4 2 1

Ok, now that we have the basic numbers. But what happens if we want to be able to read, write and have execute access. Just add up the numbers. If read=4, write=2 and execute=1 then we add 4+2+1=7. Here is a chart to demonstrate this practice:

  Type of Access
0 = no access
1 = execute only
2 = write only
3 = write and execute (1+2)
4 = read only
5 = read and execute (4+1)
6 = read and write (4+2)
7 = read and write and execute (4+2+1)

Remember earlier we said there were 3 groups (Owner, Group and Other). We must correctly set permissions for each one. How you do this is you figure out what permission(s) you want for each group and combine the numbers.

Example: Say we want the owner to have read, write and execute access, the Group to have read access and Other to have no access. Owner would be 6 (4+2), Group 4 and Others would have 0. Now all we do is combine these numbers (in the order of Owner-Group-Other) to come up with 640. Most commonly files are set at 644 permission which allows the owner to read and write the file and the group and world to only read the file.

Here are some other examples:

  user group others
655 rw- r-e r-e
754 rwx r-x r--
664 rw- rw- r--

Now you have an understanding of what CHMOD is and how to determine the correct sequence. How do you change a files access attribute? There are a couple of ways:

  1. If you have TELNET access to the server you can go to the directory where the file is located and type; chmod mode filename.
  2. Some FTP programs offer this feature. Cute_FTP offers this by right clicking on the file you want to change and selecting "change file attribute". Most FTP programs offer this, but you will need to check the documentation that came with the program.

Important Note: You should not permit a file or a directory with write permission for members of your group or all other users, as this will hazard the security of your own files, and may provide a means of entry to the UNIX file system that causes more widespread damage. You should check the file modes of all files and directories, including those files whose names begin with a dot(.).

Categories: 28 | Questions: 909

Categories: 30 | Questions: 183



  • 4.4.9, 5.2.28

  • 4.1.22. 5.0.67

  • 11

  • 2.11

  • 4.4.9, 5.2.28

  • 4.1.22. 5.0.67

  • 11

  • 2.11


SecurityMetrics Credit Card Safe

Developed by