mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 05:45:59 +01:00
git manager initial
This commit is contained in:
@@ -491,4 +491,30 @@ class FileManager:
|
||||
return HttpResponse(json_data)
|
||||
|
||||
except BaseException as msg:
|
||||
return self.ajaxPre(0, str(msg))
|
||||
return self.ajaxPre(0, str(msg))
|
||||
|
||||
def fixPermissions(self, domainName):
|
||||
|
||||
website = Websites.objects.get(domain=domainName)
|
||||
externalApp = website.externalApp
|
||||
|
||||
command = 'chown -R %s:%s /home/%s/public_html/*' % (externalApp, externalApp, domainName)
|
||||
ProcessUtilities.popenExecutioner(command)
|
||||
|
||||
command = 'chown -R %s:%s /home/%s/public_html/.[^.]*' % (externalApp, externalApp, domainName)
|
||||
ProcessUtilities.popenExecutioner(command)
|
||||
|
||||
command = "chown root:nobody /home/" + domainName + "/logs"
|
||||
ProcessUtilities.popenExecutioner(command)
|
||||
|
||||
command = "find %s -type d -exec chmod 0755 {} \;" % ("/home/" + domainName + "/public_html")
|
||||
ProcessUtilities.popenExecutioner(command)
|
||||
|
||||
command = "find %s -type f -exec chmod 0644 {} \;" % ("/home/" + domainName + "/public_html")
|
||||
ProcessUtilities.popenExecutioner(command)
|
||||
|
||||
command = 'chown %s:nobody /home/%s/public_html' % (externalApp, domainName)
|
||||
ProcessUtilities.executioner(command)
|
||||
|
||||
command = 'chmod 750 /home/%s/public_html' % (domainName)
|
||||
ProcessUtilities.executioner(command)
|
||||
Reference in New Issue
Block a user