bug fix: login page issue

This commit is contained in:
usmannasir
2025-10-01 02:33:55 +05:00
parent 873f88a3c6
commit 16828b74aa
2 changed files with 15 additions and 1 deletions

View File

@@ -2229,6 +2229,16 @@ password="%s"
command = 'mv static /usr/local/CyberCP/public/'
preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
## Set proper permissions for static files
command = 'chown -R lscpd:lscpd /usr/local/CyberCP/public/static'
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
command = r'find /usr/local/CyberCP/public/static -type d -exec chmod 755 {} \;'
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
command = r'find /usr/local/CyberCP/public/static -type f -exec chmod 644 {} \;'
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
try:
path = "/usr/local/CyberCP/version.txt"
writeToFile = open(path, 'w')
@@ -2390,6 +2400,10 @@ class Migration(migrations.Migration):
command = "chown -R lscpd:lscpd /usr/local/CyberCP/public/phpmyadmin/tmp"
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
## Fix ownership for public static files (must be owned by lscpd for web server access)
command = "chown -R lscpd:lscpd /usr/local/CyberCP/public/static"
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
## change owner
command = "chown -R root:root /usr/local/lscp"