cagefs exclude users

This commit is contained in:
Usman Nasir
2020-01-29 17:27:43 +05:00
parent 787b5ffd66
commit 4ffda73699
2 changed files with 39 additions and 0 deletions

View File

@@ -661,6 +661,9 @@ class preFlightsChecks:
command = 'chmod 600 /usr/local/CyberCP/plogical/adminPass.py'
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
command = 'chmod 600 /etc/cagefs/exclude/cyberpanelexclude'
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
command = "find /usr/local/CyberCP/ -name '*.pyc' -delete"
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
@@ -2169,6 +2172,22 @@ service_port = 9000
writeToFile.write(content)
writeToFile.close()
command = 'mkdir -p /etc/cagefs/exclude'
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
content = """cyberpanel
docker
ftpuser
lscpd
opendkim
pdns
vmail
"""
writeToFile = open('/etc/cagefs/exclude/cyberpanelexclude', 'w')
writeToFile.write(content)
writeToFile.close()
except:
pass

View File

@@ -1678,6 +1678,9 @@ CSRF_COOKIE_SECURE = True
command = 'chmod 600 /usr/local/CyberCP/plogical/adminPass.py'
Upgrade.executioner(command, 0)
command = 'chmod 600 /etc/cagefs/exclude/cyberpanelexclude'
Upgrade.executioner(command, 0)
command = "find /usr/local/CyberCP/ -name '*.pyc' -delete"
Upgrade.executioner(command, 0)
@@ -2032,6 +2035,23 @@ service_port = 9000
writeToFile.write(content)
writeToFile.close()
command = 'mkdir -p /etc/cagefs/exclude'
Upgrade.executioner(command, command, 0)
content = """cyberpanel
docker
ftpuser
lscpd
opendkim
pdns
vmail
"""
writeToFile = open('/etc/cagefs/exclude/cyberpanelexclude', 'w')
writeToFile.write(content)
writeToFile.close()
except:
pass