Here’s my theory. For some reason, $filemanager_path is empty by the time it gets to where it’s used. That makes it "/" which makes MODx think you’re trying to access a directory above the MODx root, so it throws you out.
I’m pretty sure the problem is manifesting in the file manager/actions/files.dynamic.php.
I think the error is thrown here:
// check to see user isn't trying to move below the document_root
if(substr(strtolower(str_replace('//','/',$startpath."/")), 0, $len)!=strtolower(str_replace('//','/',$filemanager_path."/"))) {
echo $_lang['files_access_denied']; ?>
So, if I’m right, something is wrong with either $startpath or $filemanager_path. Back up the file and change the above code to:
// check to see user isn't trying to move below the document_root
if(substr(strtolower(str_replace('//','/',$startpath."/")), 0, $len)!=strtolower(str_replace('//','/',$filemanager_path."/"))) {
// echo $_lang['files_access_denied'];
echo 'STARTPATH: ' $startpath . "<br />
echo 'FILEMANAGER_PATH: ' $filemanager_path . "<br />
?>
If $filemanager_path is empty, try putting this line at the top of the file in the //settings section (revert the code above to its original form):
$filemanager_path = "/var/www/sterling/";
If that doesn’t work. Start from the original file and try this change around line 100:
From:
// get the current work directory
if(isset($_REQUEST['path']) && !empty($_REQUEST['path'])) {
$_REQUEST['path'] = str_replace('..','',$_REQUEST['path']);
$startpath = is_dir($_REQUEST['path']) ? $_REQUEST['path'] : removeLastPath($_REQUEST['path']) ;
} else {
$startpath = $filemanager_path;
}
To:
// get the current work directory
//if(isset($_REQUEST['path']) && !empty($_REQUEST['path'])) {
// $_REQUEST['path'] = str_replace('..','',$_REQUEST['path']);
// $startpath = is_dir($_REQUEST['path']) ? $_REQUEST['path'] : removeLastPath($_REQUEST['path']) ;
//} else {
$filemanager_path = "/var/www/sterling/";
$startpath = $filemanager_path;
//}
This might not be a workable solution to your problem, but if it gets you past that first error message it will tell us something. If it does, try uncommenting the other lines (but leave the hard-coded $filemanager_path) and see what happens.
Hope this makes sense.