permissions fix

This commit is contained in:
Usman Nasir
2021-12-28 19:17:25 +05:00
parent cc3816d607
commit c40c452a7f
3 changed files with 14 additions and 0 deletions

View File

@@ -677,6 +677,11 @@ class preFlightsChecks:
command = 'chmod 700 %s' % ('/home/cyberpanel')
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
destPrivKey = "/usr/local/lscp/conf/key.pem"
command = 'chmod 600 %s' % (destPrivKey)
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
###
def install_unzip(self):

View File

@@ -2122,6 +2122,11 @@ echo $oConfig->Save() ? 'Done' : 'Error';
command = 'chmod 700 %s' % ('/home/cyberpanel')
Upgrade.executioner(command, 0)
destPrivKey = "/usr/local/lscp/conf/key.pem"
command = 'chmod 600 %s' % (destPrivKey)
Upgrade.executioner(command, 0)
Upgrade.stdOut("Permissions updated.")
except BaseException as msg:

View File

@@ -460,6 +460,10 @@ class virtualHostUtilities:
return 0, retValues[1]
command = 'chmod 600 %s' % (destPrivKey)
ProcessUtilities.normalExecutioner(command)
## removing old certs for lscpd
if os.path.exists(destPrivKey):
os.remove(destPrivKey)