Dark art of Copy and Paste.. lol.. heh.. You and me both. I know just enough PHP to be dangerous. :D
Hopefully this helps. The only thing I found that seemed relevant was in:
administrator/components/com_ninjaxplorer/include/fun_extra.php starting with the below function at line 388. The stuff down at the bottom of the function appears to be the juicy part. :D Just being hopeful actually.
The code is gonna look like crap below. Not sure how to format it.
function chmod_recursive($item, $mode) { // chmod file / dir
$ok = true;
if(@is_link($item) || @is_file($item)) {
$ok=@chmod( $item, $mode );
}
elseif(@is_dir($item)) {
if(($handle=@opendir($item))===false) {
add_error(basename($item).": ".$GLOBALS["error_msg"]["opendir"]);
return false;
}
while(($file=readdir($handle))!==false) {
if(($file==".." || $file==".")) continue;
$new_item = $item."/".$file;
if(!@file_exists($new_item)) {
add_error(basename($item).": ".$GLOBALS["error_msg"]["readdir"]);
continue;
}
//if(!get_show_item($item, $new_item)) continue;
if(@is_dir($new_item)) {
$ok=chmod_recursive($new_item, $mode);
if($ok) add_message($GLOBALS['messages']['permchange'].' '.$new_item);
} else {
$ok=@chmod($new_item, $mode);
if($ok) add_message($GLOBALS['messages']['permchange'].' '.$new_item);
}
}
closedir($handle);
if( is_dir( $item )) {
$bin = decbin( $mode );
// when we chmod a directory we must care for the permissions
// to prevent that the directory becomes not readable (when the "execute bits" are removed)
$bin = substr_replace( $bin, '1', 2, 1 ); // set 1st x bit to 1
$bin = substr_replace( $bin, '1', 5, 1 );// set 2nd x bit to 1
$bin = substr_replace( $bin, '1', 8, 1 );// set 3rd x bit to 1
$mode = bindec( $bin );
}
$ok=@chmod( $item, $mode );
if($ok) add_message($GLOBALS['messages']['permchange'].' '.$new_item);
}
return $ok;}