security fix: CP-01: Installation

This commit is contained in:
Usman Nasir
2021-07-29 13:06:20 +05:00
parent 7b7c336b0e
commit fd82b81b33
2 changed files with 8 additions and 2 deletions

View File

@@ -652,6 +652,9 @@ class preFlightsChecks:
rainloopinipath = '/usr/local/lscp/cyberpanel/rainloop/data/_data_/_default_/configs/application.ini'
command = 'chmod 600 /usr/local/CyberCP/public/rainloop.php'
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
###
def install_unzip(self):
@@ -2289,8 +2292,6 @@ def main():
if args.redis != None:
checks.installRedis()
checks.fixCyberPanelPermissions()
if args.postfix != None:
checks.enableDisableEmail(args.postfix.lower())
else:
@@ -2350,6 +2351,8 @@ echo $oConfig->Save() ? 'Done' : 'Error';
except:
pass
checks.fixCyberPanelPermissions()
logging.InstallLog.writeToFile("CyberPanel installation successfully completed!,80")

View File

@@ -2070,6 +2070,9 @@ echo $oConfig->Save() ? 'Done' : 'Error';
command = '/usr/local/lsws/lsphp72/bin/php /usr/local/CyberCP/public/rainloop.php'
Upgrade.executioner(command, 0)
command = 'chmod 600 /usr/local/CyberCP/public/rainloop.php'
Upgrade.executioner(command, 0)
Upgrade.stdOut("Permissions updated.")
except BaseException as msg: