Skip to content
Permalink
Browse files
update some permissions structure;
"
  • Loading branch information
usmannasir committed Feb 20, 2020
1 parent 07d0304 commit 9c3c2aa31a652356288c3b86a9b27afd2831986b
Showing 1 changed file with 11 additions and 2 deletions.
@@ -95,7 +95,11 @@ def createDirectories(path, virtualHostUser, pathHTML, pathLogs, confPath, compl
try:
os.makedirs(pathHTML)

command = "chown " + virtualHostUser + ":" + virtualHostUser + " " + pathHTML
command = "chown " + virtualHostUser + ":nobody " + pathHTML
cmd = shlex.split(command)
subprocess.call(cmd, stdout=FNULL, stderr=subprocess.STDOUT)

command = "chmod 750 %s" % (pathHTML)
cmd = shlex.split(command)
subprocess.call(cmd, stdout=FNULL, stderr=subprocess.STDOUT)

@@ -771,9 +775,14 @@ def createDirectoryForDomain(masterDomain, domain, phpVersion, path, administrat

try:
os.makedirs(path)
command = "chown " + virtualHostUser + ":" + virtualHostUser + " " + path
command = "chown " + virtualHostUser + ":nobody " + path
cmd = shlex.split(command)
subprocess.call(cmd, stdout=FNULL, stderr=subprocess.STDOUT)

command = "chmod 755 %s" % (path)
cmd = shlex.split(command)
subprocess.call(cmd, stdout=FNULL, stderr=subprocess.STDOUT)

except OSError as msg:
logging.CyberCPLogFileWriter.writeToFile(
str(msg) + "329 [Not able to create directories for virtual host [createDirectoryForDomain]]")

0 comments on commit 9c3c2aa

Please sign in to comment.