@@ -351,8 +351,13 @@ def installWordPress(self):
351
351
352
352
##
353
353
354
+ if ProcessUtilities .decideDistro () == ProcessUtilities .centos :
355
+ groupName = 'nobody'
356
+ else :
357
+ groupName = 'nogroup'
358
+
354
359
if home != '0' :
355
- command = "chown " + externalApp + ":" + 'nobody' + " " + finalPath
360
+ command = "chown " + externalApp + ":" + groupName + " " + finalPath
356
361
ProcessUtilities .executioner (command , externalApp )
357
362
358
363
command = 'chmod 750 %s' % (self .permPath )
@@ -370,8 +375,13 @@ def installWordPress(self):
370
375
371
376
homeDir = "/home/" + domainName + "/public_html"
372
377
378
+ if ProcessUtilities .decideDistro () == ProcessUtilities .centos :
379
+ groupName = 'nobody'
380
+ else :
381
+ groupName = 'nogroup'
382
+
373
383
if not os .path .exists (homeDir ):
374
- command = "chown " + externalApp + ":" + 'nobody' + " " + homeDir
384
+ command = "chown " + externalApp + ":" + groupName + " " + homeDir
375
385
ProcessUtilities .executioner (command , externalApp )
376
386
377
387
try :
@@ -523,8 +533,13 @@ def installPrestaShop(self):
523
533
524
534
##
525
535
536
+ if ProcessUtilities .decideDistro () == ProcessUtilities .centos :
537
+ groupName = 'nobody'
538
+ else :
539
+ groupName = 'nogroup'
540
+
526
541
if home == '0' :
527
- command = "chown -R " + externalApp + ":" + 'nobody' + " " + finalPath
542
+ command = "chown -R " + externalApp + ":" + groupName + " " + finalPath
528
543
ProcessUtilities .executioner (command , externalApp )
529
544
530
545
command = "rm -f prestashop_1.7.4.2.zip"
@@ -544,8 +559,13 @@ def installPrestaShop(self):
544
559
545
560
homeDir = "/home/" + domainName + "/public_html"
546
561
562
+ if ProcessUtilities .decideDistro () == ProcessUtilities .centos :
563
+ groupName = 'nobody'
564
+ else :
565
+ groupName = 'nogroup'
566
+
547
567
if not os .path .exists (homeDir ):
548
- command = "chown -R " + externalApp + ":" + 'nobody' + " " + homeDir
568
+ command = "chown -R " + externalApp + ":" + groupName + " " + homeDir
549
569
ProcessUtilities .executioner (command , externalApp )
550
570
551
571
try :
@@ -652,7 +672,12 @@ def setupGit(self):
652
672
653
673
##
654
674
655
- command = "chown -R " + externalApp + ":" + 'nobody' + " " + finalPath
675
+ if ProcessUtilities .decideDistro () == ProcessUtilities .centos :
676
+ groupName = 'nobody'
677
+ else :
678
+ groupName = 'nogroup'
679
+
680
+ command = "chown -R " + externalApp + ":" + groupName + " " + finalPath
656
681
ProcessUtilities .executioner (command , externalApp )
657
682
658
683
vhost .addRewriteRules (domainName )
@@ -714,10 +739,15 @@ def gitPull(self):
714
739
715
740
##
716
741
742
+ if ProcessUtilities .decideDistro () == ProcessUtilities .centos :
743
+ groupName = 'nobody'
744
+ else :
745
+ groupName = 'nogroup'
746
+
717
747
website = Websites .objects .get (domain = domain )
718
748
externalApp = website .externalApp
719
749
720
- command = "chown -R " + externalApp + ":" + 'nobody' + " " + finalPath
750
+ command = "chown -R " + externalApp + ":" + groupName + " " + finalPath
721
751
ProcessUtilities .executioner (command , externalApp )
722
752
723
753
return 0
@@ -756,7 +786,12 @@ def detachRepo(self):
756
786
757
787
##
758
788
759
- command = "chown -R " + externalApp + ":" + 'nobody' + " " + finalPath
789
+ if ProcessUtilities .decideDistro () == ProcessUtilities .centos :
790
+ groupName = 'nobody'
791
+ else :
792
+ groupName = 'nogroup'
793
+
794
+ command = "chown -R " + externalApp + ":" + groupName + " " + finalPath
760
795
ProcessUtilities .executioner (command , website .externalApp )
761
796
762
797
gitPath = '/home/cyberpanel/' + domain + '.git'
@@ -906,7 +941,12 @@ def installJoomla(self):
906
941
907
942
shutil .rmtree (finalPath + "installation" )
908
943
909
- command = "chown -R " + virtualHostUser + ":" + 'nobody' + " " + finalPath
944
+ if ProcessUtilities .decideDistro () == ProcessUtilities .centos :
945
+ groupName = 'nobody'
946
+ else :
947
+ groupName = 'nogroup'
948
+
949
+ command = "chown -R " + virtualHostUser + ":" + groupName + " " + finalPath
910
950
ProcessUtilities .executioner (command )
911
951
912
952
vhost .addRewriteRules (domainName )
@@ -927,8 +967,13 @@ def installJoomla(self):
927
967
928
968
homeDir = "/home/" + domainName + "/public_html"
929
969
970
+ if ProcessUtilities .decideDistro () == ProcessUtilities .centos :
971
+ groupName = 'nobody'
972
+ else :
973
+ groupName = 'nogroup'
974
+
930
975
if not os .path .exists (homeDir ):
931
- command = "chown -R " + virtualHostUser + ":" + 'nobody' + " " + homeDir
976
+ command = "chown -R " + virtualHostUser + ":" + groupName + " " + homeDir
932
977
ProcessUtilities .executioner (command )
933
978
934
979
try :
@@ -1120,8 +1165,13 @@ def installMagento(self):
1120
1165
1121
1166
##
1122
1167
1168
+ if ProcessUtilities .decideDistro () == ProcessUtilities .centos :
1169
+ groupName = 'nobody'
1170
+ else :
1171
+ groupName = 'nogroup'
1172
+
1123
1173
if home != '0' :
1124
- command = "chown -R " + externalApp + ":" + 'nobody' + " " + finalPath
1174
+ command = "chown -R " + externalApp + ":" + groupName + " " + finalPath
1125
1175
ProcessUtilities .executioner (command , externalApp )
1126
1176
1127
1177
installUtilities .reStartLiteSpeed ()
@@ -1140,8 +1190,13 @@ def installMagento(self):
1140
1190
1141
1191
homeDir = "/home/" + domainName + "/public_html"
1142
1192
1193
+ if ProcessUtilities .decideDistro () == ProcessUtilities .centos :
1194
+ groupName = 'nobody'
1195
+ else :
1196
+ groupName = 'nogroup'
1197
+
1143
1198
if not os .path .exists (homeDir ):
1144
- command = "chown -R " + externalApp + ":" + 'nobody' + " " + homeDir
1199
+ command = "chown -R " + externalApp + ":" + groupName + " " + homeDir
1145
1200
ProcessUtilities .executioner (command , externalApp )
1146
1201
1147
1202
try :
0 commit comments