Squid+squidguard not running



  • Dear Users, I have a problem about security error message:

    After installing the package there is some error message as:

    "php: /pkg_edit.php: The command '/usr/local/sbin/squid -D' returned exit code '126', the output was '/usr/local/sbin/squid: Permission denied' "

    and then it shows the correction way is as:
    " $ ls -l /usr/local/sbin/squid
    lrwxr-xr-x  1 root  wheel  30 Mar 23 11:20 /usr/local/sbin/squid -> /usr/pbi/squid-i386/sbin "

    but it doesn't work when i correct it as message before i said but if i correct manually the correction way like this:
    "lrwxr-xr-x  1 root  wheel  30 Mar 23 11:20 /usr/local/sbin/squid -> /usr/pbi/squid-i386/sbin/squid"

    It works perfectly. According to me it must be the correction way as: "lrwxr-xr-x  1 root  wheel  30 Mar 23 11:20 /usr/local/sbin/squid -> /usr/pbi/squid-i386/sbin/squid"



  • There is a little bug in /etc/inc/pkg-utils.inc in pkg_fetch_recursive.

    		$linkdirs = array('bin','sbin');
    		foreach($linkdirs as $dir) {
    			if(is_dir("{$pbidir}/{$dir}")) {
    				$files = scandir("{$pbidir}/{$dir}");
    				foreach($files as $f) {
    					if(!file_exists("/usr/local/{$dir}/{$f}")) {
    						symlink("{$pbidir}/{$dir}/[b]$[/b]{$f}","/usr/local/{$dir}/{$f}");
    					}
    				}
    			}
    		}
    
    

    The bonus "$" before "{$f}" means the filename isn't ending up in the symlinks made here.
    I have done a successful install using the 22 March 2012 nanobsd image, after editing out the bonus "$". I have just submitted a pull request on Github for this change.


Log in to reply