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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error 403 1

Status
Not open for further replies.

Lifegard

Technical User
Apr 16, 2001
11
US
Hello, i trying to get cgi program called dcguest to run under Apache i am getting the following error. when i typed in in the ie address bar.

Error 403 Forbidden: "You don't have permission to access /cgi-bin/dcguest" on this server"

I checked the logs in apache and it says the following error

"Filename is not valid:d:/apache/cgi-bin/dcguest"

This tells me that either the directory does not have read and write privildges is that true. Or apache is not setup to execute the cgi file.
 
Usually, that message means that your code is not executable on the server. If you are using a UNIX server, then you must tell the OS that the file is executable by changing the permissions associated with the file. If you have command line access to the server, use chmod +x yourCode.cgi. If you don't have command line access and are FTP'ing your code onto the server, then you will need to use your FTP client to do the trick for you. Most popular ftp clients will let you set the execute bits as you upload the file.

Also, if you are writing your code on a DOS box and uploading to a UNIX box, you will need to convert the file into UNIX flavor. UNIX and DOS use different line ending characters. A DOS file will not run (execute) on a UNIX box. Again, most FTP clients will let you do this on-the-fly with the upload.

Also, I just posted a FAQ, faq452-653 , in this forum which goes over the basics of CGI. I think you might find it helpful and I could use a little feed back about whether or not it makes sense.

I hope this helps.


keep the rudder amid ship and beware the odd typo
 
I understand that. thanks it did shed some light. I am using Win NT server
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top