Skip to content

Commit b248133

Browse files
committed
bug fix: remote transfer
1 parent f5aaabf commit b248133

21 files changed

Lines changed: 73 additions & 69 deletions

File tree

CLManager/CLManagerMain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def submitCageFSInstall(self):
7373
1)
7474
return 0
7575

76-
execPath = "sudo python /usr/local/CyberCP/CLManager/CageFS.py"
76+
execPath = "/usr/local/CyberCP/bin/python2 /usr/local/CyberCP/CLManager/CageFS.py"
7777
execPath = execPath + " --function submitCageFSInstall"
7878
ProcessUtilities.outputExecutioner(execPath)
7979

api/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ def remoteTransfer(request):
379379

380380
## Accounts to transfer is a path to file, containing accounts.
381381

382-
execPath = "python " + virtualHostUtilities.cyberPanel + "/plogical/remoteTransferUtilities.py"
382+
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/remoteTransferUtilities.py"
383383
execPath = execPath + " remoteTransfer --ipAddress " + ipAddress + " --dir " + dir + " --accountsToTransfer " + path
384384
ProcessUtilities.popenExecutioner(execPath)
385385

backup/backupManager.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def cancelBackupCreation(self, userID = None, data = None):
249249
backupCancellationDomain = data['backupCancellationDomain']
250250
fileName = data['fileName']
251251

252-
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
252+
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
253253
execPath = execPath + " cancelBackupCreation --backupCancellationDomain " + backupCancellationDomain + " --fileName " + fileName
254254
subprocess.call(shlex.split(execPath))
255255

@@ -310,7 +310,7 @@ def submitRestore(self, data = None, userID = None):
310310
else:
311311
return ACLManager.loadErrorJson()
312312

313-
execPath = "sudo nice -n 10 python " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
313+
execPath = "sudo nice -n 10 /usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
314314
execPath = execPath + " submitRestore --backupFile " + backupFile + " --dir " + dir
315315
ProcessUtilities.popenExecutioner(execPath)
316316
time.sleep(4)
@@ -424,7 +424,7 @@ def submitDestinationCreation(self, userID = None, data = None):
424424
except:
425425
port = "22"
426426

427-
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
427+
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
428428
execPath = execPath + " submitDestinationCreation --ipAddress " + ipAddress + " --password " \
429429
+ password + " --port " + port
430430

@@ -503,7 +503,7 @@ def getConnectionStatus(self, userID = None, data = None):
503503

504504
ipAddress = data['IPAddress']
505505

506-
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
506+
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
507507
execPath = execPath + " getConnectionStatus --ipAddress " + ipAddress
508508

509509
output = ProcessUtilities.executioner(execPath)
@@ -891,7 +891,7 @@ def submitRemoteBackups(self, userID = None, data = None):
891891

892892
##
893893

894-
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/remoteTransferUtilities.py"
894+
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/remoteTransferUtilities.py"
895895
execPath = execPath + " writeAuthKey --pathToKey " + pathToKey
896896
output = ProcessUtilities.outputExecutioner(execPath)
897897

@@ -1057,7 +1057,7 @@ def remoteBackupRestore(self, userID = None, data = None):
10571057

10581058
##
10591059

1060-
execPath = "python " + virtualHostUtilities.cyberPanel + "/plogical/remoteTransferUtilities.py"
1060+
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/remoteTransferUtilities.py"
10611061
execPath = execPath + " remoteBackupRestore --backupDirComplete " + backupDirComplete + " --backupDir " + str(
10621062
backupDir)
10631063

cloudAPI/cloudManager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def fetchWebsiteData(self):
128128
## bw usage calculation
129129

130130
try:
131-
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
131+
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
132132
execPath = execPath + " findDomainBW --virtualHostName " + self.data[
133133
'domainName'] + " --bandwidth " + str(
134134
website.package.bandwidth)

containerization/containerManager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def submitContainerInstall(self):
124124
1)
125125
return 0
126126

127-
execPath = "sudo python /usr/local/CyberCP/containerization/container.py"
127+
execPath = "/usr/local/CyberCP/bin/python2 /usr/local/CyberCP/containerization/container.py"
128128
execPath = execPath + " --function submitContainerInstall"
129129
ProcessUtilities.outputExecutioner(execPath)
130130

databases/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def setupPHPMYAdminSession(request):
134134
userID = request.session['userID']
135135
admin = Administrator.objects.get(id = userID)
136136

137-
execPath = "sudo python /usr/local/CyberCP/databases/databaseManager.py"
137+
execPath = "/usr/local/CyberCP/bin/python2 /usr/local/CyberCP/databases/databaseManager.py"
138138
execPath = execPath + " generatePHPMYAdminData --userID " + str(userID)
139139

140140
output = ProcessUtilities.outputExecutioner(execPath)

dockerManager/container.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def submitInstallDocker(self):
8282
writeToFile = open(ServerStatusUtil.lswsInstallStatusPath, 'w')
8383
writeToFile.close()
8484

85-
execPath = "sudo python /usr/local/CyberCP/dockerManager/dockerInstall.py"
85+
execPath = "/usr/local/CyberCP/bin/python2 /usr/local/CyberCP/dockerManager/dockerInstall.py"
8686
ProcessUtilities.executioner(execPath)
8787

8888
time.sleep(2)

emailPremium/views.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def savePolicyServerStatus(request):
101101

102102
## save configuration data
103103

104-
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
104+
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
105105
execPath = execPath + " savePolicyServerStatus --install " + install
106106
output = ProcessUtilities.outputExecutioner(execPath)
107107

@@ -784,7 +784,7 @@ def installSpamAssassin(request):
784784
return ACLManager.loadErrorJson()
785785
try:
786786

787-
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
787+
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
788788
execPath = execPath + " installSpamAssassin"
789789
ProcessUtilities.popenExecutioner(execPath)
790790

@@ -810,7 +810,7 @@ def installStatusSpamAssassin(request):
810810

811811
if installStatus.find("[200]")>-1:
812812

813-
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
813+
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
814814
execPath = execPath + " configureSpamAssassin"
815815
output = ProcessUtilities.outputExecutioner(execPath)
816816

@@ -981,7 +981,7 @@ def saveSpamAssassinConfigurations(request):
981981

982982
## save configuration data
983983

984-
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
984+
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
985985
execPath = execPath + " saveSpamAssassinConfigs --tempConfigPath " + tempConfigPath
986986
output = ProcessUtilities.outputExecutioner(execPath)
987987

firewall/firewallManager.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -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

mailServer/mailserverManager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ def generateDKIMKeys(self):
566566
else:
567567
return ACLManager.loadErrorJson()
568568

569-
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
569+
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
570570
execPath = execPath + " generateKeys --domain " + domainName
571571
output = ProcessUtilities.outputExecutioner(execPath)
572572

@@ -636,7 +636,7 @@ def installStatusOpenDKIM(self):
636636

637637
if installStatus.find("[200]") > -1:
638638

639-
execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
639+
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
640640
execPath = execPath + " configureOpenDKIM"
641641

642642
output = ProcessUtilities.outputExecutioner(execPath)

0 commit comments

Comments
 (0)