@@ -371,7 +371,7 @@ def saveSSHConfigs(self, userID = None, data = None):
371371 else :
372372 rootLogin = "0"
373373
374- execPath = "sudo python " + virtualHostUtilities .cyberPanel + "/plogical/firewallUtilities.py"
374+ execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities .cyberPanel + "/plogical/firewallUtilities.py"
375375 execPath = execPath + " saveSSHConfigs --type " + str (type ) + " --sshPort " + sshPort + " --rootLogin " + rootLogin
376376
377377 output = ProcessUtilities .outputExecutioner (execPath )
@@ -418,7 +418,7 @@ def deleteSSHKey(self, userID = None, data = None):
418418
419419 key = data ['key' ]
420420
421- execPath = "sudo python " + virtualHostUtilities .cyberPanel + "/plogical/firewallUtilities.py"
421+ execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities .cyberPanel + "/plogical/firewallUtilities.py"
422422 execPath = execPath + " deleteSSHKey --key '" + key + "'"
423423
424424 output = ProcessUtilities .outputExecutioner (execPath )
@@ -512,7 +512,7 @@ def installModSec(self, userID = None, data = None):
512512 else :
513513 return ACLManager .loadErrorJson ('installModSec' , 0 )
514514
515- execPath = "sudo python " + virtualHostUtilities .cyberPanel + "/plogical/modSec.py"
515+ execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities .cyberPanel + "/plogical/modSec.py"
516516 execPath = execPath + " installModSec"
517517
518518 ProcessUtilities .popenExecutioner (execPath )
@@ -535,7 +535,7 @@ def installStatusModSec(self, userID = None, data = None):
535535
536536 if installStatus .find ("[200]" ) > - 1 :
537537
538- execPath = "sudo python " + virtualHostUtilities .cyberPanel + "/plogical/modSec.py"
538+ execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities .cyberPanel + "/plogical/modSec.py"
539539
540540 execPath = execPath + " installModSecConfigs"
541541
@@ -781,7 +781,7 @@ def saveModSecConfigurations(self, userID = None, data = None):
781781
782782 ## save configuration data
783783
784- execPath = "sudo python " + virtualHostUtilities .cyberPanel + "/plogical/modSec.py"
784+ execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities .cyberPanel + "/plogical/modSec.py"
785785
786786 execPath = execPath + " saveModSecConfigs --tempConfigPath " + tempConfigPath
787787
@@ -836,7 +836,7 @@ def saveModSecConfigurations(self, userID = None, data = None):
836836
837837 ## save configuration data
838838
839- execPath = "sudo python " + virtualHostUtilities .cyberPanel + "/plogical/modSec.py"
839+ execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities .cyberPanel + "/plogical/modSec.py"
840840
841841 execPath = execPath + " saveModSecConfigs --tempConfigPath " + tempConfigPath
842842
@@ -962,7 +962,7 @@ def saveModSecRules(self, userID = None, data = None):
962962
963963 ## save configuration data
964964
965- execPath = "sudo python " + virtualHostUtilities .cyberPanel + "/plogical/modSec.py"
965+ execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities .cyberPanel + "/plogical/modSec.py"
966966 execPath = execPath + " saveModSecRules"
967967 output = ProcessUtilities .outputExecutioner (execPath )
968968
@@ -1107,7 +1107,7 @@ def installModSecRulesPack(self, userID = None, data = None):
11071107
11081108 if ProcessUtilities .decideServer () == ProcessUtilities .OLS :
11091109
1110- execPath = "sudo python " + virtualHostUtilities .cyberPanel + "/plogical/modSec.py"
1110+ execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities .cyberPanel + "/plogical/modSec.py"
11111111 execPath = execPath + " " + packName
11121112
11131113 output = ProcessUtilities .outputExecutioner (execPath )
@@ -1125,7 +1125,7 @@ def installModSecRulesPack(self, userID = None, data = None):
11251125 final_json = json .dumps ({'installStatus' : 0 , 'error_message' : "OWASP will be available later." , })
11261126 return HttpResponse (final_json )
11271127
1128- execPath = "sudo python " + virtualHostUtilities .cyberPanel + "/plogical/modSec.py"
1128+ execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities .cyberPanel + "/plogical/modSec.py"
11291129 execPath = execPath + " " + packName
11301130 output = ProcessUtilities .outputExecutioner (execPath )
11311131
@@ -1265,7 +1265,7 @@ def enableDisableRuleFile(self, userID = None, data = None):
12651265 else :
12661266 functionName = 'enableRuleFile'
12671267
1268- execPath = "sudo python " + virtualHostUtilities .cyberPanel + "/plogical/modSec.py"
1268+ execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities .cyberPanel + "/plogical/modSec.py"
12691269
12701270 execPath = execPath + " " + functionName + ' --packName ' + packName + ' --fileName ' + fileName
12711271
0 commit comments