Skip to content

Commit 20a88b0

Browse files
committed
bug fix: file manager permissions
1 parent 1f1863f commit 20a88b0

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

filemanager/views.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,9 @@
55
from loginSystem.models import Administrator
66
from loginSystem.views import loadLoginPage
77
import plogical.CyberCPLogFileWriter as logging
8-
from django.http import HttpResponse,Http404
8+
from django.http import HttpResponse
99
import json
1010
from websiteFunctions.models import Websites
11-
import subprocess
12-
import shlex
13-
import os
14-
from plogical.virtualHostUtilities import virtualHostUtilities
1511
from plogical.acl import ACLManager
1612
from .filemanager import FileManager as FM
1713
from plogical.processUtilities import ProcessUtilities
@@ -53,7 +49,7 @@ def changePermissions(request):
5349
website = Websites.objects.get(domain=domainName)
5450
externalApp = website.externalApp
5551

56-
command = "chown -R " + externalApp + ":" + externalApp +" /home/"+domainName
52+
command = 'chown -R %s:%s /home/%s/public_html/*' % (externalApp, externalApp, domainName)
5753
ProcessUtilities.popenExecutioner(command)
5854

5955
command = "chown root:nobody /home/" + domainName+"/logs"

0 commit comments

Comments
 (0)