bug fix: snappymail on ubuntu 24

This commit is contained in:
usmannasir
2025-08-31 19:55:56 +05:00
parent f1f779c618
commit 09eac4de1c
3 changed files with 14 additions and 18 deletions

View File

@@ -825,6 +825,10 @@ password="%s"
command = "usermod -a -G lscpd nobody 2>/dev/null || true"
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
# Fix SnappyMail public directory ownership early
command = "chown -R lscpd:lscpd /usr/local/CyberCP/public/snappymail/data 2>/dev/null || true"
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
snappymailinipath = '/usr/local/lscp/cyberpanel/snappymail/data/_data_/_default_/configs/application.ini'
command = 'chmod 600 /usr/local/CyberCP/public/snappymail.php'
@@ -1460,11 +1464,8 @@ $cfg['Servers'][$i]['LogoutURL'] = 'phpmyadminsignin.php?logout';
command = "usermod -a -G lscpd nobody 2>/dev/null || true"
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
command = "usermod -a -G lscpd www-data 2>/dev/null || true"
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
# Additional fix for Ubuntu 24.04: ensure systemd user has access
command = "usermod -a -G lscpd systemd-network 2>/dev/null || true"
# Fix SnappyMail public directory ownership immediately after creation
command = "chown -R lscpd:lscpd /usr/local/CyberCP/public/snappymail/data 2>/dev/null || true"
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
command = "mkdir -p /usr/local/lscp/cyberpanel/rainloop/data"
@@ -2919,11 +2920,8 @@ echo $oConfig->Save() ? 'Done' : 'Error';
command = "usermod -a -G lscpd nobody 2>/dev/null || true"
subprocess.call(shlex.split(command))
command = "usermod -a -G lscpd www-data 2>/dev/null || true"
subprocess.call(shlex.split(command))
# Additional fix for Ubuntu 24.04: ensure systemd user has access
command = "usermod -a -G lscpd systemd-network 2>/dev/null || true"
# Fix SnappyMail public directory ownership (critical fix)
command = "chown -R lscpd:lscpd /usr/local/CyberCP/public/snappymail/data 2>/dev/null || true"
subprocess.call(shlex.split(command))
except:
pass