mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-02-01 04:09:03 +01:00
bug fix: permissions during cpanel import'
This commit is contained in:
@@ -713,23 +713,9 @@ class cPanelImporter:
|
||||
return 0
|
||||
|
||||
def FixPermissions(self):
|
||||
externalApp = self.externalApp
|
||||
command = "sudo chown -R " + externalApp + ":" + externalApp + " /home/" + self.mainDomain
|
||||
ProcessUtilities.normalExecutioner(command)
|
||||
|
||||
if ProcessUtilities.decideDistro() == ProcessUtilities.centos:
|
||||
groupName = 'nobody'
|
||||
else:
|
||||
groupName = 'nogroup'
|
||||
|
||||
command = "sudo chown -R root:%s /home/" % (groupName) + self.mainDomain + "/logs"
|
||||
ProcessUtilities.normalExecutioner(command)
|
||||
|
||||
command = "sudo find %s -type d -exec chmod 0755 {} \;" % ("/home/" + self.mainDomain + "/public_html")
|
||||
ProcessUtilities.normalExecutioner(command)
|
||||
|
||||
command = "sudo find %s -type f -exec chmod 0644 {} \;" % ("/home/" + self.mainDomain + "/public_html")
|
||||
ProcessUtilities.normalExecutioner(command)
|
||||
from filemanager.filemanager import FileManager
|
||||
fm = FileManager(None, None)
|
||||
fm.fixPermissions(self.mainDomain)
|
||||
|
||||
def MainController(self):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user