LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-07-2005, 11:02 AM   #1
Spreegem
Member
 
Registered: Mar 2005
Posts: 42

Rep: Reputation: 15
Can not access cgi-bin from browser.


I'm installing a cgi script, and was going to try is, but when I try to get to the cgi-bin directory from my browser, it says 403 forbidden, even though the permissins for my cgi-bin folder are chmodded to 755. Any help would be greatly appreciated, thank you in advance.
 
Old 11-07-2005, 11:24 AM   #2
ssfrstlstnm
Member
 
Registered: Dec 2004
Location: IN, USA
Distribution: debian etch
Posts: 402

Rep: Reputation: 30
What user is the web server running under? You have execute permissions set for the owner of cgi-bin so that means that the owner of cgi-bin needs to be the same as the user running the server.

Can you access html pages on the server?

Please post the relevant portion of your server config file.
 
Old 11-07-2005, 04:39 PM   #3
Spreegem
Member
 
Registered: Mar 2005
Posts: 42

Original Poster
Rep: Reputation: 15
How can I find out what user the server is running as, and yes I can access HTML pages, and what would be the relevant section of the server config file?
 
Old 11-07-2005, 05:05 PM   #4
ssfrstlstnm
Member
 
Registered: Dec 2004
Location: IN, USA
Distribution: debian etch
Posts: 402

Rep: Reputation: 30
If you are using apache web server and have not yet looked at the config file you should do that now. It is probably in /etc/apache. It is usually called httpd.conf, but on my system is apache2.conf. Everything is pretty well commented so a lot of it is self-explanetory. The user and group tags are where you tell it what user should be running apache. This should normally be nobody, but on my debian system is www-data. Also pay close attention to Document Root and <Directory> directives. In my case these are in a subdirectory called sites-enabled. Also you may want to do some reading up on apache configuration. It can be a security risk if things are not set up right. And if your not using apache, then I can't help you cause that's all I know.
 
Old 11-07-2005, 05:25 PM   #5
Spreegem
Member
 
Registered: Mar 2005
Posts: 42

Original Poster
Rep: Reputation: 15
Ok, I changed the permissions on cgi-bin, my apache server is like yours, the user running it is www-data same with the group. Do I need to restart apache after I change the permissions on cgi-bin, becuase now I'm getting a 404 error, even though the cgi file is in cgi-bin.
 
Old 11-07-2005, 05:47 PM   #6
ssfrstlstnm
Member
 
Registered: Dec 2004
Location: IN, USA
Distribution: debian etch
Posts: 402

Rep: Reputation: 30
You should not have to restart apache unless you changed something in the config file. 404 is file not found, so it seems you have the correct permissions set now. What are you typing in your browsers address line? Also make sure you have something like this in your config file and that the ScriptAlias directive points to where your scripts are (change /usr/lib/cgi-bin/ if you need to).

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
 
Old 11-07-2005, 07:22 PM   #7
Spreegem
Member
 
Registered: Mar 2005
Posts: 42

Original Poster
Rep: Reputation: 15
Thanks alot, I got it working now!
 
  


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
Cannot access cgi-bin directory for Nagios hywaydave23 Linux - Software 1 10-12-2005 06:16 AM
Ftp access To Cgi-bin redhatlover Red Hat 3 05-04-2004 04:32 AM
How do i access the files in my CGI-BIN rhuser Linux - Software 2 03-04-2003 03:33 PM
no access to cgi-bin within Apache Mackeral Linux - Software 6 05-14-2002 05:15 AM
no access to cgi-bin j-ray Linux - General 0 04-01-2002 07:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:55 AM.

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