mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-14 09:16:11 +01:00
bug fix: security
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import os,sys
|
||||
|
||||
from .processUtilities import ProcessUtilities
|
||||
|
||||
sys.path.append('/usr/local/CyberCP')
|
||||
import django
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "CyberCP.settings")
|
||||
@@ -831,5 +834,20 @@ class ACLManager:
|
||||
domainName = Websites.objects.get(domain=domain)
|
||||
return domainName.externalApp
|
||||
|
||||
@staticmethod
|
||||
def CreateSecureDir():
|
||||
### Check if upload path tmp dir is not available
|
||||
|
||||
UploadPath = '/usr/local/CyberCP/tmp/'
|
||||
|
||||
if not os.path.exists(UploadPath):
|
||||
command = 'mkdir %s' % (UploadPath)
|
||||
ProcessUtilities.executioner(command)
|
||||
|
||||
command = 'chown cyberpanel:cyberpanel %s' % (UploadPath)
|
||||
ProcessUtilities.executioner(command)
|
||||
|
||||
command = 'chmod 711 %s' % (UploadPath)
|
||||
ProcessUtilities.executioner(command)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user