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

2
.idea/workspace.xml generated
View File

@@ -6,7 +6,7 @@
<component name="ChangeListManager">
<list default="true" id="5251c5c9-f2a1-41f2-bc76-10b517091df1" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/loginSystem/templates/loginSystem/login.html" beforeDir="false" afterPath="$PROJECT_DIR$/loginSystem/templates/loginSystem/login.html" afterDir="false" />
<change beforePath="$PROJECT_DIR$/install/install.py" beforeDir="false" afterPath="$PROJECT_DIR$/install/install.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />

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"