Set mode for any files which contain an install created password

This commit is contained in:
rperper
2018-11-07 15:14:54 -05:00
parent 5fb2b31cbd
commit c56caf3a2a
2 changed files with 86 additions and 67 deletions

View File

@@ -9,6 +9,7 @@ import randomPassword
import errno
import MySQLdb as mariadb
import install
import stat
#distros
centos=0
@@ -869,6 +870,7 @@ class InstallCyberPanel:
else:
writeDataToFile.writelines(items)
os.fchmod(writeDataToFile, stat.S_IRUSR | stat.S_IWUSR)
writeDataToFile.close()
logging.InstallLog.writeToFile("PureFTPD configured!")
@@ -1028,6 +1030,8 @@ class InstallCyberPanel:
else:
writeDataToFile.writelines(items)
os.fchmod(writeDataToFile, stat.S_IRUSR | stat.S_IWUSR)
writeDataToFile.close()
logging.InstallLog.writeToFile("PowerDNS configured!")
@@ -1247,6 +1251,8 @@ def Main(cwd, mysql, distro):
password = open(file_name, "w")
password.writelines(InstallCyberPanel.mysql_Root_password)
os.fchmod(password, stat.S_IRUSR | stat.S_IWUSR)
password.close()
if distro == centos: