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 03-19-2001, 10:07 PM   #1
willl_hunting
LQ Newbie
 
Registered: Jan 2001
Location: Pakistan
Posts: 5

Rep: Reputation: 0
Post


Hi:
i am a newbie, i want to setup a cgi-script on my web server.
the Web's root directory as set in httpd.conf is "/web"
my html file which is calling this cgi is in this folder and the cgi i want to call is there in the same folder the permission is set as 755.
<form action="/web/myfilename.cgi" method="POST">
the cgi-bin folder tag is set as "/web" in the "httpd.conf".
now when i try to call this cgi script from html page i get the message..
"error message 403, don't have permission to use this script"
i am using the computer as "root", and i have checked that all the permission is set as 755 and files path is correct..
can anybody please tell me what canbe wrong with that..
any positive help will be greatly appreciated
 
Old 03-20-2001, 12:56 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 235Reputation: 235Reputation: 235
You might want to create its own cgi-bin folder and refer it to that! Have you tried that? If so, does it come up with the same error?
 
Old 03-20-2001, 08:51 PM   #3
willl_hunting
LQ Newbie
 
Registered: Jan 2001
Location: Pakistan
Posts: 5

Original Poster
Rep: Reputation: 0
i have tried to put this page in different folders e.g "/usr/cgi-bin" , "/web/cgi-bin" and even "/web" that's my webpage root in httpd.conf file, i'm working on the comp as "root" i have set all the permission to 755.
but the same " error 403. you don't have permission to use /my-cgi-script.cgi "
perhaps all i need is a pre-configured "httpd.conf" file which has got correctly set "cgi-bin" path.
 
Old 03-20-2001, 10:40 PM   #4
crabboy
Senior Member
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,823

Rep: Reputation: 120Reputation: 120
You might want to check the permissions on the cgi directory. Since you are root, it may be the case that root owns the directory and the nobody user can't access it. You may try to su nobody and see if he had permissions to execute the script in that directory. I'm not sure if the nobody user needs execute permission on that dir.

The way that I usually setup directories for my virtual servers is to setup a directory, in my case under /home/apache and recursivly set the permission on that dir to nobody.nogroup and point the virtual server to that directory.

As for cgi-bin directories, I usually don't use them. Some say it is a security hazzard, but it is easier to do the following.

<Directory /home/apache/whatever>
Options +ExecCGI
</Directory>

<Directory /home/apache/mail>
Options +ExecCGI
</Directory>

This enables cgi programs to execute in the directories.

Hope this helps

Gary
 
  


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
Directory listing - Calling shell script from a CGI script seran Programming 6 08-12-2005 12:08 AM
python cgi script and premature end of script headers Neruocomp Programming 1 07-28-2005 12:43 PM
SSH in a CGI script michedlp Programming 7 04-16-2004 11:58 AM
pipe in a cgi script lukas_z Linux - Software 0 08-10-2003 04:43 PM
how do i set up my web server to use the Cgi-bin rhuser Linux - Software 2 02-22-2003 10:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:35 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