From bee6bb1c1428029478f189d52c5bf191f40e7bc4 Mon Sep 17 00:00:00 2001 From: usmannasir Date: Thu, 4 Jan 2024 15:41:39 +0500 Subject: [PATCH] bug fix: fix session mountpoint for php when using cloudlinux --- CLManager/CageFS.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/CLManager/CageFS.py b/CLManager/CageFS.py index 9baaa8bc6..2e4729b84 100644 --- a/CLManager/CageFS.py +++ b/CLManager/CageFS.py @@ -108,6 +108,26 @@ def submitCageFSInstall(): writeToFile.write('CLInstalled') writeToFile.close() + + + #### mount session save paths + + if os.path.exists('/etc/cagefs/cagefs.mp'): + + from managePHP.phpManager import PHPManager + php_versions = PHPManager.findPHPVersions() + + for php in php_versions: + PHPVers = PHPManager.getPHPString(php) + line = f'@/var/lib/lsphp/session/lsphp{PHPVers},700\n' + + WriteToFile = open('/etc/cagefs/cagefs.mp', 'a') + WriteToFile.write(line) + WriteToFile.close() + + command = 'cagefsctl --remount-all' + ServerStatusUtil.executioner(command, statusFile) + logging.CyberCPLogFileWriter.statusWriter(ServerStatusUtil.lswsInstallStatusPath, "Packages successfully installed.[200]\n", 1)