So, I'm thinking something like this instead:
PHP Code:
function fixPermissions(){
// Get OS
$sysOS = PHP_OS;
// path to be corrected
$mod_path = '/etc/sentora/panel/modules/sentastico/packages';
switch($sysOS){
case 'Linux':
system("/bin/chmod -R 0755 ".$mod_path);
system("/bin/chown -R ".system('whoami').":".system('groups')." ".$mod_path);
break;
default:
// Windows or incompatible operating system !!Do Nothing!!
break;
}
}
fixPermissions();