Skip to content

Commit 28c3dfc

Browse files
committed
bug fix: permissions during cpanel import'
1 parent 806992b commit 28c3dfc

1 file changed

Lines changed: 3 additions & 17 deletions

File tree

plogical/cPanelImporter.py

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -713,23 +713,9 @@ def RestoreDatabases(self):
713713
return 0
714714

715715
def FixPermissions(self):
716-
externalApp = self.externalApp
717-
command = "sudo chown -R " + externalApp + ":" + externalApp + " /home/" + self.mainDomain
718-
ProcessUtilities.normalExecutioner(command)
719-
720-
if ProcessUtilities.decideDistro() == ProcessUtilities.centos:
721-
groupName = 'nobody'
722-
else:
723-
groupName = 'nogroup'
724-
725-
command = "sudo chown -R root:%s /home/" % (groupName) + self.mainDomain + "/logs"
726-
ProcessUtilities.normalExecutioner(command)
727-
728-
command = "sudo find %s -type d -exec chmod 0755 {} \;" % ("/home/" + self.mainDomain + "/public_html")
729-
ProcessUtilities.normalExecutioner(command)
730-
731-
command = "sudo find %s -type f -exec chmod 0644 {} \;" % ("/home/" + self.mainDomain + "/public_html")
732-
ProcessUtilities.normalExecutioner(command)
716+
from filemanager.filemanager import FileManager
717+
fm = FileManager(None, None)
718+
fm.fixPermissions(self.mainDomain)
733719

734720
def MainController(self):
735721

0 commit comments

Comments
 (0)