Download your favorite Linux distribution at LQ ISO.
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 03-19-2001, 09:07 PM   #1
LQ Newbie
Registered: Jan 2001
Location: Pakistan
Posts: 5

Rep: Reputation: 0

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, 11:56 AM   #2
LQ Guru
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 256Reputation: 256Reputation: 256
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, 07:51 PM   #3
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, 09:40 PM   #4
Senior Member
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,823

Rep: Reputation: 121Reputation: 121
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 /home/apache/mail>
Options +ExecCGI

This enables cgi programs to execute in the directories.

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

All times are GMT -5. The time now is 08:22 PM.

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
Open Source Consulting | Domain Registration