Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with simple cgi ? 1

Status
Not open for further replies.

bluegroper

Technical User
Dec 12, 2002
407
AU
I’m trying to learn a little about perl and cgi.
Ok to create an html form to execute a .cgi file with following line :
print `ls -al $directory`;
($directory is param from html form)
Works fine.
Now trying to use `print grep $searchtext $directory`
But just keep getting obscure permission errors in logs (see below).
So `ls` works OK, but `grep` does not.
Server is usual Linux with Apache, etc.
Is this an apache problem ?
Any clues as to how to fix.
Security is not a big issue as this server is not accessible from the internet.
Much TIA’s
-BG


[Sat Dec 30 10:46:19 2006] [error] [client 192.168.1.177] grep: , referer: [Sat Dec 30 10:46:19 2006] [error] [client 192.168.1.177] /var/log/anaconda.log, referer: [Sat Dec 30 10:46:19 2006] [error] [client 192.168.1.177] : Permission denied, referer: [Sat Dec 30 10:46:19 2006] [error] [client 192.168.1.177] , referer: [Sat Dec 30 10:46:19 2006] [error] [client 192.168.1.177] grep: , referer:
 
Please ignore.
Problem solved.
Sorry for bother (and stupid question). :-(
- BG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top