From: Larry G. <Li...@IS...> - 2003-06-09 01:39:08
|
Hi, I hope I am posting this question to the correct list! I have been trying to work on a couple of problems I am having with the squidguard (third party) module. I have resolved all but one problem. Creating the blacklist db files. Below is the subroutine from squidguard-lib.pl which is called from enable_blacklist.cgi to create a new db file from the blacklist. For some reason I just can't create the db file if executed from the enable CGI script via miniserv. However, if I simulate the subroutine via a Perl script from the command line, it works. You will be able to see that I have echoed the command to a text file just to make sure variables are being passed correctly, which they are. #---------------------------- # squidguard-lib.pl # rebuild_db($file) # Rebuild the dbfile $file with squidguard -C sub rebuild_db { my $bin = &get_binary_path(); &terror('lib_nobin') if (! -x $bin); if (-e $_[0]) { `echo "$bin -C $_[0]" > /var/lib/squidguard/blacklists/ads/xxx.txt`; &backquote_logged("$bin -C $_[0] 2>&1 </dev/null"); &webmin_log('rebuild', 'dbfile', $_[0]); &sgchown($_[0]); &sgchown("$_[0].db"); } if (! -e $_[0]) { `echo "$bin -C $_[0]" > /var/lib/squidguard/blacklists/ads/yyy.txt`; } &reload_squid(); } #---------------------------- I am just getting burnt-out on this one. Anyone have any ideas why I can make this work via the Perl script/command line but not via CGI/miniserv? Thanks for any help! -- Larry Gilson |