Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-09-2005, 01:36 PM   #1
LQ Newbie
Registered: Jun 2005
Posts: 2

Rep: Reputation: 0
configuring a cgi shell script to run

I'm trying to get to work a simple shell script in the cgi-bin directory used by my apache web server. The script just echos test to stdout (and I've run it on the command line to verify that it works), now I just need to know how to chmod or whatever so that it can be run from the outside world with an http request to the server.

Thanks for any help you can give,

- keeg (that's geek spelled backwards)
Old 06-09-2005, 01:45 PM   #2
Senior Member
Registered: Sep 2002
Location: CA
Distribution: openSuSE, Cent OS, Slackware
Posts: 1,131

Rep: Reputation: 75
It should be chmod'ed to 755 or 'rwxr-xr-x'. You also may need to print a header like:

print "Content-type: text/html", "\n\n";
print "test"
That's two new lines after the contype. How to chmod try "man chmod" it's an easy learn. Hope this helps.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
cgi shell script: ssh not working kitmui Programming 2 04-21-2010 02:46 PM
Directory listing - Calling shell script from a CGI script seran Programming 6 08-11-2005 11:08 PM
HELP:write a CGI program with shell script supermyself Programming 3 06-12-2005 03:10 PM
how to execute shell scripts from cgi script rajatgarg Linux - General 1 07-08-2004 01:39 PM
Running a shell script via CGI-BIN chrisk5527 Linux - General 3 05-09-2003 11:44 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:23 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration