View Full Version : Running as CGI
filipp
10-04-2005, 09:45 AM
At least the copy_folder.php addon assumes that pixelpost is NOT run as CGI (links to admin/index.php) Very many sites allow file upload ONLY through CGI however. admin/index.php is easy to fix, but one must do quite a bit of searching to find all references to admin/index.php
Maybe there should be configuration directive for this (that would point to the apropriate admin index file)?
Cheers,
-filipp
raminia
10-04-2005, 08:30 PM
I don't have any clue.
blinking8s
10-05-2005, 01:01 AM
cg whaaa? lol...many sites allow only uploa through cgi? im confused
filipp
10-05-2005, 06:23 AM
Now You've got me all confused as well. :)
Running something as CGI essentially means the program runs with Your (who installed the script) security clearance. This allows for example, an upload directory be owned by you and to have "normal" permissions of 0755 instead of the world-writable (0777),which if You ask me is a pretty big security hole (for starters, anyone on the server can put stuff in those folders)
I guess the specifics vary from site to site, but as an example, on our school site (running Apache 2.0) all scripts that need to upload and/or process files have to:
1) Have their extensions changed to cgi
2) Have a interpreter declaration as the first line (like #! /usr/local/bin/php)
3) Have permissions 0700
raminia
10-05-2005, 07:17 AM
your photoblog is running right what did you modify to make it work on servers that run php as cgi?
filipp
10-05-2005, 12:32 PM
your photoblog is running right what did you modify to make it work on servers that run php as cgi?
The public side works fine because it doesn't need write permissions on the server. On the admin side, I had to do the aformentioned modifications. Also all references to "index.php" in admin/index.cgi had to be changed to "index.cgi", I think the addons folder should also be gone thru. Hopefully this will come in handy for someone with a similar problem. :)
First time I see that PHP in CGI mode needs rename file from xxx.php to xxx.cgi. You must have very unusual configuration of your server.
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.