@@ -351,8 +351,13 @@ def installWordPress(self):
351351
352352 ##
353353
354+ if ProcessUtilities .decideDistro () == ProcessUtilities .centos :
355+ groupName = 'nobody'
356+ else :
357+ groupName = 'nogroup'
358+
354359 if home != '0' :
355- command = "chown " + externalApp + ":" + 'nobody' + " " + finalPath
360+ command = "chown " + externalApp + ":" + groupName + " " + finalPath
356361 ProcessUtilities .executioner (command , externalApp )
357362
358363 command = 'chmod 750 %s' % (self .permPath )
@@ -370,8 +375,13 @@ def installWordPress(self):
370375
371376 homeDir = "/home/" + domainName + "/public_html"
372377
378+ if ProcessUtilities .decideDistro () == ProcessUtilities .centos :
379+ groupName = 'nobody'
380+ else :
381+ groupName = 'nogroup'
382+
373383 if not os .path .exists (homeDir ):
374- command = "chown " + externalApp + ":" + 'nobody' + " " + homeDir
384+ command = "chown " + externalApp + ":" + groupName + " " + homeDir
375385 ProcessUtilities .executioner (command , externalApp )
376386
377387 try :
@@ -523,8 +533,13 @@ def installPrestaShop(self):
523533
524534 ##
525535
536+ if ProcessUtilities .decideDistro () == ProcessUtilities .centos :
537+ groupName = 'nobody'
538+ else :
539+ groupName = 'nogroup'
540+
526541 if home == '0' :
527- command = "chown -R " + externalApp + ":" + 'nobody' + " " + finalPath
542+ command = "chown -R " + externalApp + ":" + groupName + " " + finalPath
528543 ProcessUtilities .executioner (command , externalApp )
529544
530545 command = "rm -f prestashop_1.7.4.2.zip"
@@ -544,8 +559,13 @@ def installPrestaShop(self):
544559
545560 homeDir = "/home/" + domainName + "/public_html"
546561
562+ if ProcessUtilities .decideDistro () == ProcessUtilities .centos :
563+ groupName = 'nobody'
564+ else :
565+ groupName = 'nogroup'
566+
547567 if not os .path .exists (homeDir ):
548- command = "chown -R " + externalApp + ":" + 'nobody' + " " + homeDir
568+ command = "chown -R " + externalApp + ":" + groupName + " " + homeDir
549569 ProcessUtilities .executioner (command , externalApp )
550570
551571 try :
@@ -652,7 +672,12 @@ def setupGit(self):
652672
653673 ##
654674
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
656681 ProcessUtilities .executioner (command , externalApp )
657682
658683 vhost .addRewriteRules (domainName )
@@ -714,10 +739,15 @@ def gitPull(self):
714739
715740 ##
716741
742+ if ProcessUtilities .decideDistro () == ProcessUtilities .centos :
743+ groupName = 'nobody'
744+ else :
745+ groupName = 'nogroup'
746+
717747 website = Websites .objects .get (domain = domain )
718748 externalApp = website .externalApp
719749
720- command = "chown -R " + externalApp + ":" + 'nobody' + " " + finalPath
750+ command = "chown -R " + externalApp + ":" + groupName + " " + finalPath
721751 ProcessUtilities .executioner (command , externalApp )
722752
723753 return 0
@@ -756,7 +786,12 @@ def detachRepo(self):
756786
757787 ##
758788
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
760795 ProcessUtilities .executioner (command , website .externalApp )
761796
762797 gitPath = '/home/cyberpanel/' + domain + '.git'
@@ -906,7 +941,12 @@ def installJoomla(self):
906941
907942 shutil .rmtree (finalPath + "installation" )
908943
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
910950 ProcessUtilities .executioner (command )
911951
912952 vhost .addRewriteRules (domainName )
@@ -927,8 +967,13 @@ def installJoomla(self):
927967
928968 homeDir = "/home/" + domainName + "/public_html"
929969
970+ if ProcessUtilities .decideDistro () == ProcessUtilities .centos :
971+ groupName = 'nobody'
972+ else :
973+ groupName = 'nogroup'
974+
930975 if not os .path .exists (homeDir ):
931- command = "chown -R " + virtualHostUser + ":" + 'nobody' + " " + homeDir
976+ command = "chown -R " + virtualHostUser + ":" + groupName + " " + homeDir
932977 ProcessUtilities .executioner (command )
933978
934979 try :
@@ -1120,8 +1165,13 @@ def installMagento(self):
11201165
11211166 ##
11221167
1168+ if ProcessUtilities .decideDistro () == ProcessUtilities .centos :
1169+ groupName = 'nobody'
1170+ else :
1171+ groupName = 'nogroup'
1172+
11231173 if home != '0' :
1124- command = "chown -R " + externalApp + ":" + 'nobody' + " " + finalPath
1174+ command = "chown -R " + externalApp + ":" + groupName + " " + finalPath
11251175 ProcessUtilities .executioner (command , externalApp )
11261176
11271177 installUtilities .reStartLiteSpeed ()
@@ -1140,8 +1190,13 @@ def installMagento(self):
11401190
11411191 homeDir = "/home/" + domainName + "/public_html"
11421192
1193+ if ProcessUtilities .decideDistro () == ProcessUtilities .centos :
1194+ groupName = 'nobody'
1195+ else :
1196+ groupName = 'nogroup'
1197+
11431198 if not os .path .exists (homeDir ):
1144- command = "chown -R " + externalApp + ":" + 'nobody' + " " + homeDir
1199+ command = "chown -R " + externalApp + ":" + groupName + " " + homeDir
11451200 ProcessUtilities .executioner (command , externalApp )
11461201
11471202 try :
0 commit comments