HEX
Server: Apache
System: Linux msm5694.mjhst.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: camjab_ssh (1000)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: //home/httpd/mech_ftp/baretube.com/admin/cli/resetScriptPermissions.php
<?
require("../../mb.php");
if ($argv[1]) {
    foreach ($argv as $arg) {
        $e = explode("=", $arg);
        if (count($e) == 2) {
            $command = $e[0];
			$param = $e[1];
        } else {
            $command = $e[0];
        }
    }
}

if(!$command) { 
	exit("This file will reset all required directories to 777.\nIf you are sure you want to do this, please execute it as follows: php resetScriptPermissions.php imsure\n"); 
}

if($command == 'imsure') { 
	if($basepath) { 
		shell_exec("chmod -R 777 $basepath/cache"); 
		shell_exec("chmod -R 777 $basepath/content"); 
		shell_exec("chmod -R 777 $basepath/media"); 
		shell_exec("chmod -R 777 $basepath/ftp*"); 
		shell_exec("chmod -R 777 $basepath/csv*"); 
		shell_exec("chmod -R 777 $basepath/temp_users_uploads"); 
		shell_exec("chmod -R 777 $basepath/admin/scripts"); 
		shell_exec("chmod -R 777 $basepath/admin/logs"); 
		exit("Done");
	} else { 
		exit("Basepath not set!"); 
	}	
}
?>