cgi scripts not working for all users on this server

yiqiang

Verified User
Joined
Mar 9, 2005
Messages
12
Im trying to get my cgi files to work.
They are placed correctly in the cgi folder
and the cgi's are chmod to 755.
But they dont seem to work.
 
Last edited:
You have to have cgi turned on at the reseller level for each user who will have cgi access.

Jeff
 
All files and directories have been chmod-ed to 755.
The user has also been activated for CGI access.

Any other suggestions?
 
You say you turned off write access on the directories but your CGI program still thinks write access is turned on?

I'd say check carefully.

That's not reasonable.

If it's true, then there's got to be a bug somewhere in the cgi program(s) or possible in CGI itself. if the latter, then you can always report it, but you'd sure be embarrassed if it weren't, and I don't think it is, since no one else has reported it.

Jeff
 
Yes, we have the same problem.

We also get a html file in the cgi-bin but the same: error 404

the cgi-bin no work :(
 
Check to see if write access is turned on somewhere in the path.

Jeff
 
Logged in through the shell as a root user, navigate to the directory with the problem and do:

pwd

which will give you something like this:

/home/username/domains/example.com/public_html/cgi-bin

then do the following:

ls -ald /home
ls -ald /home/username
ls -ald /home/username/domains
ls -ald /home/username/domains/example.com
ls -ald /home/username/domains/example.com/public_html
ls -ald /home/username/domains/example.com/public_html/cgi-bin

(of course substituting username and example.com for what works on your server).

Then post the output from these commands.

Since this problem appears among several users on several threads, if we can't figure it out from your post I may feel like getting JBMC staff involved, but only after we have something to show them.

Jeff
 
Am I doing this right? Because it is giving me no such file or directory


knucklehead# pwd
/usr/home/aboutsaws/domains/about-saws.com/public_html/cgi-bin


knucklehead# ls -ald home
ls: home: No such file or directory
knucklehead# ls -ald cgi-bin
ls: cgi-bin: No such file or directory
knucklehead#
 
I wasn't thinking as clearly as I should have been when I wrote the example.

Sorry about that.

I've since edited my post above to show the right way to do it.

Jeff
 
DA support responded. The test file was messed up and then they had to chmod to 755. (I know we tried 777 and 755 but I guess that doesn't work on a bad file).

Now we have one server working, another I tested with a new test file and it worked. I haven't tried the 3rd yet.

I have this one on the server that we know is working now:

http://www.about-saws.com/

They have 3 lines on the page:
[an error occurred while processing this directive]

Towards the bottom.

code:
<!--#include virtual="/cgi-bin/sfbomb.cgi?keywords=tile+saw&results=1&bid=n"-->

<!--#include virtual="/cgi-bin/search.cgi?keywords=saws&results=12&bid=n"-->

<!--#include virtual="/cgi-bin/link_wrapper.cgi"-->

Is the problem with this one because they are calling a script in the cgi bin?
 
CGI programs will fail if they're not uploaded as ascii. Using the DA file manager from a windows system is bound to get you in trouble with CGI programs.

I'm sorry I didn't think to write this sooner.

Jeff
 
jlasman said:
CGI programs will fail if they're not uploaded as ascii. Using the DA file manager from a windows system is bound to get you in trouble with CGI programs.

I'm sorry I didn't think to write this sooner.

Jeff

They uploaded it in ascii. They have the same script being used on many sites with different host. He said 2 of which use DA.

The hello world worked. And SSI is working to pull a regular html into the page. As well as another call <script src="/cgi-bin/be_random.cgi?mode=nossi"></script>
which works fine.

It is just the virtual calls that are not working.
 
jlasman said:
CGI programs will fail if they're not uploaded as ascii.
Jeff

err... no! Not if they're binaries! (Which incidentally I use a lot of myself!)

Has anyone checked to make sure that the ownership of all directories from public_html up is set to the correct user? If not suexec will not allow them.
 
mike_p said:
err... no! Not if they're binaries! (Which incidentally I use a lot of myself!)
You're right of course.Many of us in the hosting business don't allow CGI binaries, because we don't want our clients to be able to run binaries we can't examine if required.

Jeff
 
Back
Top