[thelist] CGI script and CHMOD

mia at miaridge.com mia at miaridge.com
Fri Jan 25 05:08:00 CST 2002


On Fri, 25 Jan 2002, sfmalo wrote:

> Questions:
> 1. Will this work on both a UNIX and a Windows2000 server?

I guess it could work on a Win2k server, but you'd need to adapt it for
ActivePerl, IIS or Apache, and whatever mail client you're running.  In a
Win2k system, it's probably CDONTS (from memory, it's a while since I've
sent mail from Windows).  IMO, if you're on a Windows server, you're
probably better off with an ASP-type script that uses native Windows
technologies.

> 2. I'm stumped about the $sendmail location which reads
> "/usr/sbin/sendmail". Does that mean I have to create a directory or
> subdirectory called /usr/sbin/sendmail and, if so, where do I place it

In this section, you're modifying the script with the details of your
server's setup, so you change the lines to match your system, not your
system to match the lines :)

In your script, the words with $ in front are variables that you customise
for your site.  So, $sendmail should be set to the location of the
sendmail application on your system, $sitetitle should be set to the name
of your site, etc.

If you're on a Unix or Linux system that already has the program called
'sendmail' installed, you should change this line to the path to sendmail
on your system.  You can use the 'which sendmail' command at the prompt to
find out the path.

For example, on one of my systems, the command 'which sendmail' results in
'/usr/sbin/sendmail' but on yours it might be in 'usr/bin/apps/sendmail'.

> script to my cgi-bin and chmod it to 755.  I haven't the foggiest idea
> what they're talking about. What is "chmod?" How and what do I do to
> accomplish this? And what does 755 mean?

'Chmod' is a command that changes the access permissions of a file.  On a
Unix/Linux system, type 'man chmod' to find out more, but a google search
will probably provide more user-friendly information.  Basically, each
number represents the permissions each user or group of users has for that
file.

These might help:
http://support.discusware.com/center/resources/howto/chmod.html (How to
change permissions using WS_FTP, Cute FTP, and other programs)
http://www.iboost.com/build/backend/735.htm (Beginners CGI Installation
Guide)

Hope this helps!

Mia





More information about the thelist mailing list