Basics and File Locations
CGI Programs are programs that execute and then create dynamic web content. They can create HTML pages, images, audio or video files, pretty much anything that you can put on the web.
CGI Programs can be written in virtually any scripted or compiled language. We provide many languages for your use in CGI program creation. No matter which language you use, CGI programs must have an extension of ".cgi" and must be executable at least by the owner. Also, for Apache to correctly determine the file type, it should be world-readable.
chmod 544 file.cgi
CGI programs must be placed in a directory called "cgi-bin" which resides within your "public_html" directory. You can create this directory online using the following commands.
cd ~/public_html mkdir cgi-bin chmod 755 cgi-bin
It is also possible to create this directory with a standard ftp client by first logging into ftp.eskimo.com with your username and password, and then issuing the following commands.
cd public_html mkdir cgi-bin
In the case of ftp, when you login with your username and password, you will already be in your home directory. When you use mkdir within ftp, it will create the directory with the correct permissions.
How CGI Programs Are Called
If your site is a user site under
our domain with a URL like
There is also a system cgi-bin directory in which CGI programs that we
make available can be accessed. Programs in this directory are called as
If you have a virtual domain, your CGI programs would be called as
System cgi-bin programs under your virtual domain would be called as
Perl is far the most prevalent scripted language used for CGI programs.
On Eskimo, the path to perl is
All perl CGI programs must start with:
CGI programs requiring taintperl should start with:
|Perl Articles (O'Reilly)||http://www.perl.com/|
|Comprehensive Perl Archive||http://www.cpan.org/|
There is also an online manual you can access from the shell command prompt by typing, "man perl".
Python is available for web scripting (and other uses). The path to
Python CGI scripts should be mode 544 and must start with:
Python documentation can be found at http://www.python.org/doc/.
There is also an online manual you can access from the shell command prompt by typing, "man python".
Ruby is available for web scripting (and other uses). The path to
Ruby CGI scripts should be mode 544 and must start with:
An online manual that can be accessed from the shell command prompt by typing, "man ruby".
CGI programs can also be written in any of the supported compiled languages. Any compiled programs must be created on shellx.eskimo.com or other 64-bit Intel platforms running Centos 6 Linux. Any programs developed offsite should be extensively tested as it can't be guaranteed the libraries and utilities available on your system are the same as those available here.
CGI programs execute with your permissions. If there is a flaw in your program that is exploitable remotely, your files and website may be damaged.
Many shared hosting sites execute all code under a common user ID. In that situation, a flaw in any users code can result in damage to all users websites. Here, where each users website executes under their own user ID, only your own code can expose your own website.
Programs should be very careful to eliminate any "../" back references, wild card or regular expression references to filenames or commands, or references to files or commands starting at "/". Care should be taken to make sure input does not overflow input buffers.