Skip to content
Permalink
Browse files
bug fix: permissions
  • Loading branch information
usmannasir committed Apr 8, 2020
1 parent 765eaed commit 104bc44b17aba2966d89ee50e40ed3bd8434d807
Showing 2 changed files with 30 additions and 287 deletions.
@@ -518,8 +518,21 @@ def fixPermissions(self, domainName):
command = "find %s -type f -exec chmod 0644 {} \;" % ("/home/" + domainName + "/public_html")
ProcessUtilities.popenExecutioner(command)

command = 'chown %s:%s /home/%s/public_html' % (externalApp,groupName, domainName)
command = 'chown %s:%s /home/%s/public_html' % (externalApp, groupName, domainName)
ProcessUtilities.executioner(command)

command = 'chmod 750 /home/%s/public_html' % (domainName)
ProcessUtilities.executioner(command)
ProcessUtilities.executioner(command)

for childs in website.childdomains_set.all():
command = 'chown -R %s:%s %s/*' % (externalApp, externalApp, childs.path)
ProcessUtilities.popenExecutioner(command)

command = 'chown -R %s:%s %s/.[^.]*' % (externalApp, externalApp, childs.path)
ProcessUtilities.popenExecutioner(command)

command = 'chmod 750 %s' % (childs.path)
ProcessUtilities.popenExecutioner(command)

command = 'chmod %s:%s %s' % (externalApp, groupName, childs.path)
ProcessUtilities.popenExecutioner(command)

0 comments on commit 104bc44

Please sign in to comment.