PDA

View Full Version : running blastall in cgi program


jamshaid
01-10-2007, 01:27 PM
I am trying to run blastall in a cgi program, as follows
sytem("/usr/local/bioxapps/blast/bin/blastall");
On command line, it prints out blastall help and works fine when given options to run blastall but in cgi it gives in error log the following message.

[Wed Jan 10 03:35:53 2007] [error] [client 172.16.10.203] [Wed Jan 10 03:35:53 2007] upload.cgi: Can't exec "blastall": Permission denied at /var/www/cgi-bin/practice/upload.cgi line 43., referer: http://172.16.10.200/practice/upload.html

I have also tried by setting $ENV{'PATH'} = '/../path/blastall'; in cgi program.

How can I set permissions so that blastall should run in cgi program.

jsass
01-14-2007, 06:28 AM
the "Can't exec" could be a permissions problem? What are the current permissions on blastall (from ls -l blastall)? If it doesn't have the 'other' bits as executable, and if the group of the web sever is not allowed to execute by group privileges, then you may have to: chmod o+w blastall

Also, when you modify $ENV{PATH}, make sure you're appending to the variable, not overwriting it. That is, use $ENV{PATH} = "$ENV{PATH}:/some/additional/path" . Though, you shouldn't need to do that any way in this case.