Skip to content

Commit

Permalink
bug fix: permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
usmannasir committed Apr 8, 2020
1 parent 765eaed commit 104bc44
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 287 deletions.
17 changes: 15 additions & 2 deletions filemanager/filemanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Loading

0 comments on commit 104bc44

Please sign in to comment.