Skip to content

Commit 104bc44

Browse files
committed
bug fix: permissions
1 parent 765eaed commit 104bc44

File tree

2 files changed

+30
-287
lines changed

2 files changed

+30
-287
lines changed

filemanager/filemanager.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,8 +518,21 @@ def fixPermissions(self, domainName):
518518
command = "find %s -type f -exec chmod 0644 {} \;" % ("/home/" + domainName + "/public_html")
519519
ProcessUtilities.popenExecutioner(command)
520520

521-
command = 'chown %s:%s /home/%s/public_html' % (externalApp,groupName, domainName)
521+
command = 'chown %s:%s /home/%s/public_html' % (externalApp, groupName, domainName)
522522
ProcessUtilities.executioner(command)
523523

524524
command = 'chmod 750 /home/%s/public_html' % (domainName)
525-
ProcessUtilities.executioner(command)
525+
ProcessUtilities.executioner(command)
526+
527+
for childs in website.childdomains_set.all():
528+
command = 'chown -R %s:%s %s/*' % (externalApp, externalApp, childs.path)
529+
ProcessUtilities.popenExecutioner(command)
530+
531+
command = 'chown -R %s:%s %s/.[^.]*' % (externalApp, externalApp, childs.path)
532+
ProcessUtilities.popenExecutioner(command)
533+
534+
command = 'chmod 750 %s' % (childs.path)
535+
ProcessUtilities.popenExecutioner(command)
536+
537+
command = 'chmod %s:%s %s' % (externalApp, groupName, childs.path)
538+
ProcessUtilities.popenExecutioner(command)

0 commit comments

Comments
 (0)