View Full Version : CGI Help
How come I can't insert .cgi files into my cgi-bin directory that's outside of my htdocs? When I try to, I get this error
---------------
250 OK. Current directory is /cgi-bin
PWD
257 "/cgi-bin" is your current location
Cached directory reloaded.
PASV
227 Entering Passive Mode (63,251,213,17,25,156)
Opening data connection IP: 63.251.213.17 PORT: 6556.
STOR gm-library.cgi
553 Can't open that file: Permission denied
--------------
So I read in the FAQs that it can be put into my htdocs folder, which I did. The first line in the cgi script is of course "#!/usr/bin/perl"
I CHMODed the gm.cgi file to 777, and I get an error saying it's inexecutable because it's writable, but according to the set of directions I'm following, it should be some sort of log-in prompt.
dispatcher
1-9-03, 12:51 AM
I've been using 755 for almost all cgi/pl files try that.
and use them in both the cgi-bin & htdocs directories
with no problems
What FTP program do you use???
dispatcher
1-9-03, 07:47 AM
OK - now what exactly are you trying to do, upload files???
I assume they are being uploaded OK , or you wouldn't then be able to CHMOD them (have to be uploaded first)
Or is your script trying to create a new file, and that fails, in shich case, what are the Directory's permissions??? (755 ??? maybe 777)
Bob
What I'm trying to do is upload .cgi files into my cgi-bin.
Unfortunately, for some reason I get
------250 OK. Current directory is /cgi-bin
PWD
257 "/cgi-bin" is your current location
Cached directory reloaded.
PASV
227 Entering Passive Mode (63,251,213,17,25,156)
Opening data connection IP: 63.251.213.17 PORT: 6556.
STOR gm-library.cgi
553 Can't open that file: Permission denied------
So I put them into htdocs.
The next set of directions I'm following is to go to gm.cgi on my site and I should get a login prompt (http://www.eggo.us/gm.cgi) but unfortunately, it gives me this. I'm going to see if CHMODing the gmfile to 755 will work (I'm not at my computer now).
But basically, I'm wondering why nothing can be put into my cgi-bin folder outside the htdocs.
dispatcher
1-9-03, 12:00 PM
OK - the file you refered to there is definitely in your htdocs directory, and while I believe it will work there, I would suggest at least a subdirectory be used, as it will be a lot easier to keep track of stuff later as the site fills up with stuff.
When I run that file I get a CGI-WRAP error saying that the file is group writable - that means that it is probably CHMODED 777
For security reasons the CGI-WRAP program requires a CHMOD of 755 -- change it and try the script again!
Bob
sounds like the permissions on your cgi-bin may have been changed. When you log into root.. what do the permissions show currently on your cgi-bin?
Ah, I see now. Ok, I should CHMOD it to 755.
Thanks so much.
dispatcher
1-9-03, 05:08 PM
In general, anything executable needs to be 755 or the CGI-WRAP will kill it!
Most scripts setup instructions do not take that into account and may tell you to use 766, 666 , 777, etc, but on POWWEB it usualy HAS to be 755
Bob
vBulletin v3.6.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.