bug fix: login page issue

This commit is contained in:
usmannasir
2025-10-01 03:18:39 +05:00
parent 16828b74aa
commit 80c68d4123
3 changed files with 23 additions and 6 deletions

5
.idea/workspace.xml generated
View File

@@ -4,10 +4,7 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<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$/install/install.py" beforeDir="false" afterPath="$PROJECT_DIR$/install/install.py" afterDir="false" />
</list>
<list default="true" id="5251c5c9-f2a1-41f2-bc76-10b517091df1" name="Changes" comment="" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />

View File

@@ -2400,8 +2400,16 @@ 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"
## Fix ownership and permissions for all public files (must be owned by lscpd for web server access)
## Static files (CSS, JS, images) must NOT have execute permissions - LiteSpeed blocks files with unnecessary execute bits
command = "chown -R lscpd:lscpd /usr/local/CyberCP/public/"
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
## Set proper permissions: directories get 755, files get 644 (no execute bit for static files!)
command = r'find /usr/local/CyberCP/public/ -type d -exec chmod 755 {} \;'
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
command = r'find /usr/local/CyberCP/public/ -type f -exec chmod 644 {} \;'
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
## change owner

View File

@@ -3343,6 +3343,18 @@ echo $oConfig->Save() ? 'Done' : 'Error';
command = "chown -R lscpd:lscpd /usr/local/CyberCP/public/phpmyadmin/tmp"
Upgrade.executioner(command, 'chown core code', 0)
## Fix ownership and permissions for all public files (must be owned by lscpd for web server access)
## Static files (CSS, JS, images) must NOT have execute permissions - LiteSpeed blocks files with unnecessary execute bits
command = "chown -R lscpd:lscpd /usr/local/CyberCP/public/"
Upgrade.executioner(command, 'Fix public directory ownership', 0)
## Set proper permissions: directories get 755, files get 644 (no execute bit for static files!)
command = "find /usr/local/CyberCP/public/ -type d -exec chmod 755 {} \;"
Upgrade.executioner(command, 'Fix public directory permissions', 0)
command = "find /usr/local/CyberCP/public/ -type f -exec chmod 644 {} \;"
Upgrade.executioner(command, 'Fix public file permissions', 0)
## change owner
command = "chown -R root:root /usr/local/lscp"