LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 06-09-2005, 02:36 PM   #1
keeg
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, 02:45 PM   #2
micxz
Senior Member
 
Registered: Oct 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:

Code:
#!/usr/bin/perl
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.
 
  


Reply


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 03:46 PM
Directory listing - Calling shell script from a CGI script seran Programming 6 08-12-2005 12:08 AM
HELP:write a CGI program with shell script supermyself Programming 3 06-12-2005 04:10 PM
how to execute shell scripts from cgi script rajatgarg Linux - General 1 07-08-2004 02:39 PM
Running a shell script via CGI-BIN chrisk5527 Linux - General 3 05-09-2003 12:44 PM


All times are GMT -5. The time now is 12:41 PM.

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