Explorar o código

Grant Admin Full Perms on Folders

own3mall %!s(int64=6) %!d(string=hai) anos
pai
achega
7a476f3b9e
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      OGP/ogp_agent.pl

+ 4 - 0
OGP/ogp_agent.pl

@@ -3181,16 +3181,20 @@ sub take_ownership{
 			$takeownCommand = 'takeown /U cyg_server /f "' . $windows_home_path . '" /r >/dev/null 2>&1';
 			$chmodCommand = 'chmod 775 -R "' . $windows_home_path . '" >/dev/null 2>&1';
 			$icaclsStr = 'icacls "' . $windows_home_path . '" /grant cyg_server:\\(OI\\)\\(CI\\)F /T >/dev/null 2>&1';
+			$icaclsAdminGroupFullPerms = 'icacls "' . $windows_home_path . '" /grant administrators:F /T >/dev/null 2>&1';
 			
 			if(defined $action && $action eq "str"){
 				$fullCommands .= $takeownCommand . "\n";
 				$fullCommands .= $chmodCommand . "\n";
 				$fullCommands .= $icaclsStr . "\n";
+				$fullCommands .= $icaclsAdminGroupFullPerms . "\n";
 			}else{
 				logger "Running icacls command: $icaclsStr";
+				logger "Running icacls admin group command: $icaclsAdminGroupFullPerms";
 				system($takeownCommand);
 				system($chmodCommand);
 				system($icaclsStr);
+				system($icaclsAdminGroupFullPerms);
 			}
 		}		
 	}