mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-02 11:26:28 +01:00
bug fix: login page issue
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user