Commit Graph

144 Commits

Author SHA1 Message Date
master3395
fc6639e211 Merge v2.4.4 updates: OLS v2.4.4 binaries, module config, Auto-SSL injection, OLS test suite
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-14 22:12:27 +01:00
master3395
00dedf49d1 Install logs: show paths at start and on completion; dns-one path fix; shell/composer fixes; doc install log locations 2026-02-04 23:58:43 +01:00
master3395
0ebe9aed81 Clear temp install folder on run; harden Python path in install_utils; cache-bust archive download 2026-02-04 23:38:15 +01:00
master3395
2388d68f9f Install/upgrade fixes: stdin for pipe, branch archive, Python/composer paths, MariaDB version, web server order; FTP quota and docs 2026-02-04 23:19:22 +01:00
master3395
7cab70dbaf Resolve /usr/local/CyberPanel/bin/python on install, upgrade, downgrade
Install:
- install.py: in preFlightsChecks.call(), replace missing CyberPanel python
  with /usr/bin/python3 and force shell=True so any code path (including
  old/cached script) never hits FileNotFoundError.

Upgrade:
- cyberpanel_upgrade.sh: resolve CP_PYTHON (CyberPanel, CyberCP, python3)
  before running upgrade.py and configure.py; use it for both.
- plogical/upgrade.py: add _python_for_manage(), use it in GeneralMigrations,
  collectstatic, and upgradePip so migrations/collectstatic work when
  /usr/local/CyberPanel/bin/python is missing.
2026-02-04 22:46:48 +01:00
master3395
9efecec03b Fix FileNotFoundError for /usr/local/CyberPanel/bin/python on fresh install
- install.py: only use system Python or /usr/local/CyberCP/bin/python for migrations;
  never add /usr/local/CyberPanel paths to candidate list (often missing on fresh install)
- install_utils.py: if command uses /usr/local/CyberPanel/bin/python and it does not
  exist, substitute /usr/bin/python3 and force shell=True so old/cached install.py
  also works without failing
2026-02-04 22:26:42 +01:00
master3395
fa320c37f4 Install: non-interactive SSH keygen + robust Python for migrations
- install_default_keys: use shell rm -f and ssh-keygen with stdin=y for no prompt
- Migrations: try system Python (/usr/bin/python3) first, then venv paths
- Use absolute path /usr/local/CyberCP/manage.py for makemigrations/migrate/collectstatic
- Avoid FileNotFoundError for missing /usr/local/CyberPanel/bin/python on fresh install
2026-02-04 22:13:06 +01:00
master3395
db484ce0d0 Fix makemigrations FileNotFoundError: skip broken venv symlinks when choosing Python
- Resolve symlinks and require executable file before using a path
- Skip paths that are broken symlinks or not executable (e.g. /usr/local/CyberPanel -> CyberCP when venv missing)
- Catch FileNotFoundError/OSError from subprocess when testing --version
- Ensures system python3 is used when venv paths are invalid
2026-02-04 21:47:38 +01:00
master3395
1a83f4df38 Clear MariaDB-server from dnf exclude before install; dev branch archive URL
- cyberpanel.sh: clear MariaDB-server* from dnf.conf/yum.conf before running installer so MariaDB-server can be installed (fixes exclude filtering on retry/partial install)
- cyberpanel.sh: try refs/heads/v2.5.5-dev.tar.gz for branch archive; remove installer MariaDB patch; softer chmod message
- install.py: sed fallback to strip MariaDB-server from dnf exclude if Python logic fails
2026-02-04 21:42:40 +01:00
master3395
c0b1044f45 Install fixes: venv creation, composer.sh download, SSH key non-interactive, ensure 8090/7080 accessible
- install.py: create venv at /usr/local/CyberCP if missing; add system python3 fallback for migrations; download composer.sh before chmod; remove existing SSH keys before ssh-keygen
- installCyberPanel.py: remove MariaDB-server from dnf exclude before install
- cyberpanel.sh: ensure ports 8090 and 7080 listening after install; final status shows port accessibility
- backupUtilities.py: remove existing cyberpanel keys before ssh-keygen to avoid Overwrite prompt
2026-02-04 21:33:26 +01:00
master3395
59894fc165 Add MariaDB 10.11 option; fix install/upgrade robustness
- install.py: allow --mariadb-version 10.11 (with 11.8, 12.1); use --nobest for 10.11/11.8 on RHEL; accept existing 10.x
- cyberpanel.sh: prompt and --mariadb-version accept 10.11; only pass --mariadb-version if install.py supports it; fix MySQLdb check (no __version__)
- cyberpanel_upgrade.sh: accept 10.11 in --mariadb-version and prompt; Check_Root allow uid 0 when SUDO set; Branch_Check avoid double v (vv2.5.5-dev); early root check
2026-02-04 21:15:10 +01:00
master3395
d2ab069c34 Install: MariaDB prompt first, non-interactive SSH key, AlmaLinux 9 MariaDB 11.8
- cyberpanel.sh: ask MariaDB version (11.8/12.1) first even in --auto; add --mariadb-version
- install/install.py: remove existing SSH key before ssh-keygen to avoid Overwrite (y/n) prompt
- install/installCyberPanel.py: use MariaDB 11.8 and --nobest for AlmaLinux 9 / cent8 to fix client dependency
2026-02-04 20:31:28 +01:00
master3395
1f9e7c8336 Add missing install files from stable for v2.5.5-dev install
- install/installCyberPanel.py: required by venvsetup.sh sed commands
- install/env_generator.py: parity with stable/v2.4.4

No other merges; install paths that run venvsetup.sh will no longer fail.
2026-02-04 18:59:38 +01:00
master3395
2533532e78 Fix Pure-FTPd quota syntax and service start; improve services/API error reporting
- Pure-FTPd: use Quota maxfiles:maxsize (100000:100000) instead of invalid 'Quota yes'
  in install templates and enableFTPQuota (website.py) so daemon starts
- serverStatus: run systemctl as root, return detailed error on service start failure
- FTP quota UI: better error display and feedback for enable quota action
- Doc: to-do/PURE-FTPD-QUOTA-SYNTAX-FIX.md
2026-02-04 03:00:57 +01:00
master3395
8b29ce810d SSL renewal improvements, Cron Management fixes, and randomized renewal schedule
- Randomize SSL renewal cron: day (0-6), hour, minute to spread Let's Encrypt load
- Add SSL renewal schedule display on website overview (date + time)
- Use world-readable ssl_renewal_schedule.conf (web server can't read root crontab)
- renew.py updates config file on each run for web UI display
- Display format: full date (e.g. February 05, 2026 12:00 AM)
- Cron Management page: fix button/text visibility (contrast)
- launchChild: add renewal schedule to SSL section
2026-02-04 01:21:59 +01:00
master3395
b6b0c1bf39 Fix File Manager: file deletion, special chars, upload auth (Root FM)
- Fix delete for domain and Root File Manager: use sudo helper when
  lscpd/executioner fails (TOKEN/sendCommand issues)
- Add safe-delete-path and safe-move-path helpers for base64 path handling
- Add ACLManager.isPathInsideHome and isFilePathSafeForShell for path validation
- Fix upload authorization for Root File Manager (domainName empty)
- Harden outputExecutioner result checks to prevent 500 on None
- Update Bootstrap CDN for CSP compatibility
- Improve error display and a11y focus management in modals
- Resolves #1670: files with special characters can be uploaded/deleted
2026-02-04 00:55:58 +01:00
master3395
fbe97a4e79 Let user choose MariaDB 11.8 or 12.1; default 11.8
- install.py: use preFlightsChecks.mariadb_version in mariadb_repo_setup
- venvsetup.sh: prompt for MariaDB 11.8/12.1 in interactive install, pass --mariadb-version to install.py
- cyberpanel_upgrade.sh: add MARIADB_VER (default 11.8), --mariadb-version arg, interactive prompt, write /etc/cyberpanel/mariadb_version, use in MariaDB.repo
- plogical/upgrade.py: read mariadb_version from /etc/cyberpanel/mariadb_version in fix_almalinux9_mariadb(), default 11.8
2026-02-03 21:17:25 +01:00
master3395
d130785ab1 MariaDB 11.8 LTS: use 11.8 for install and upgrade (replace 10.11/12.1)
- cyberpanel_upgrade.sh: MariaDB.repo baseurl 12.1 -> 11.8
- plogical/upgrade.py: mariadb_repo_setup 10.11 -> 11.8 (AlmaLinux 9 fix)
- install/install.py: mariadb_repo_setup 12.1 -> 11.8; _attemptMariaDBUpgrade and installMySQL target 11.8; disableMariaDB12RepositoryIfNeeded for 10.x; use existing if 11.x/12.x
- install/universal_os_fixes.py: setup_mariadb_repository 12.1 -> 11.8
- databases/databaseManager.py: mysqlversions add 11.8
- plogical/mysqlUtilities.py: RHEL baseurl https and versionToInstall
- to-do/MARIADB-11.8-LTS-UPGRADE.md
2026-02-03 21:08:32 +01:00
master3395
bbe91c34a4 OLS 1.8.5+ and LSWS 6.3.4: LiteSpeed repo, version check, LSWS fallback and sed
- Install: add LiteSpeed repo (repo.litespeed.sh), install openlitespeed; keep official binary if >= 1.8.5, else optional custom binary overlay
- Upgrade: add repo, upgrade openlitespeed package; only run installCustomOLSBinaries if version < 1.8.5
- LSWS: fallback to 6.3.4 when API empty in cyberpanel_upgrade.sh and venvsetup.sh; sed lsws-6.0 and lsws-6.3.4 to latest stable
- plogical/upgrade: add_litespeed_repo(), get_installed_ols_version(); install.py: add_litespeed_repo(), get_installed_ols_version()
2026-02-03 20:45:55 +01:00
master3395
d9329e2a21 Remove bundled plugins from v2.5.5-dev - plugins live in cyberpanel-plugins only
Removed: emailMarketing, examplePlugin, paypalPremiumPlugin, premiumPlugin, testPlugin

All plugins are now installed via Plugin Store from https://github.com/master3395/cyberpanel-plugins
2026-02-03 00:00:59 +01:00
master3395
98c7fefd99 Fix MariaDB installation issues on AlmaLinux 9
- Enhanced MariaDB-server-compat package removal with multiple aggressive attempts
- Added --allowerasing and dnf exclude to prevent compat package conflicts
- Added MariaDB binary verification before password change
- Added service status verification and wait time
- Improved error handling and graceful failure
- Fixed FileNotFoundError when mysql command not found

Fixes:
- MariaDB-server-compat-12.1.2-1.el9.noarch conflict with MariaDB 10.11
- mysql command not found after failed installation
- Installation proceeding when MariaDB wasn't actually installed
2026-01-27 00:41:43 +01:00
master3395
da4c1d9601 Fix compat removal, shell metachars in call(), upgrade AlmaLinux 9 MariaDB
- install_utils.call: use shell=True for commands with ||, 2>, |, etc.
  Avoids 'No matching repo to modify: 2>/dev/null, true, ||' when
  dnf config-manager '... 2>/dev/null || true' is run via shlex.split.

- Add explicit 'rpm -e --nodeps MariaDB-server-compat-12.1.2-1.el9.noarch'
  before dnf remove in main(), installMySQL, fix_almalinux9_comprehensive.

- upgrade fix_almalinux9_mariadb: add compat removal before MariaDB install;
  use MariaDB 10.11 repo instead of 12.1 to avoid compat conflicts.
2026-01-27 00:23:56 +01:00
master3395
de21c03fc7 Fix MariaDB compat, mysql path, and OpenLiteSpeed binary install
MariaDB-server-compat:
- Remove MariaDB-server-compat* in main() before any MariaDB install
- Use dnf remove then rpm -e --nodeps loop in main(), installMySQL, fix_almalinux9
- Prevents transaction conflicts when installing MariaDB 10.11

mysql command not found:
- install_utils.call: detect mysql/mariadb commands, use shell=True and full path
- Replace leading mysql/mariadb with /usr/bin/mariadb or /usr/bin/mysql
- Fixes FileNotFoundError when changeMYSQLRootPassword runs

OpenLiteSpeed:
- Create /usr/local/lsws and /usr/local/lsws/bin before installing custom binary
- Fixes 'No such file or directory: /usr/local/lsws/bin/openlitespeed'
2026-01-26 23:21:53 +01:00
master3395
99b24f853a Fix mysql command not found error in install_utils.call
- Detect mysql/mariadb commands and find binary path automatically
- Replace mysql/mariadb with full path (/usr/bin/mysql or /usr/bin/mariadb)
- Use shell=True for mysql commands to handle complex SQL properly
- Fixes FileNotFoundError when executing mysql commands
- Works with both mysql and mariadb binaries
2026-01-26 22:58:56 +01:00
master3395
a28c4287bf Remove conflicting MariaDB-server-compat packages before installation
- Remove MariaDB-server-compat* packages that conflict with MariaDB 10.11
- Fixes transaction test errors when installing MariaDB 10.11
- Removes compat packages from previous MariaDB 12.1 installation attempts
- Ensures clean MariaDB 10.11 installation without conflicts
- Also remove sudo from curl command (not needed when running as root)
2026-01-26 22:58:06 +01:00
master3395
ba43d72649 Call disableMariaDB12RepositoryIfNeeded earlier in main() function
- Called immediately after apply_os_specific_fixes()
- Runs before Pre_Install_Required_Components attempts MariaDB installation
- Ensures dnf exclude is set before any package operations
- Prevents MariaDB upgrade attempts
2026-01-26 21:49:17 +01:00
master3395
65af295f0e Improve MariaDB repository disabling and add dnf exclude
- Enhanced repository file detection using glob
- Better repository file parsing to disable MariaDB sections
- Always add MariaDB-server to dnf excludes to prevent upgrades
- Handles both existing and new dnf.conf files
- Prevents MariaDB upgrade attempts in Pre_Install_Required_Components
2026-01-26 21:48:45 +01:00
master3395
98ec16f714 Call disableMariaDB12RepositoryIfNeeded in fix_almalinux9_comprehensive
- Ensures MariaDB 12.1 repository is disabled early in the process
- Called before Pre_Install_Required_Components runs
- Prevents upgrade attempts when MariaDB 10.x is already installed
2026-01-26 21:42:34 +01:00
master3395
bd570c563b Add function to disable MariaDB 12.1 repository when 10.x is installed
- Prevents upgrade attempts in Pre_Install_Required_Components
- Called early in installation process before repository setup
- Disables MariaDB 12.1 repository files if MariaDB 10.x is detected
- Fixes 'PREIN scriptlet failed' error during installation
2026-01-26 21:42:12 +01:00
master3395
273e3ecdc3 Add MariaDB check before repository setup in installMySQL
- Check if MariaDB is already installed before setting up 12.1 repository
- Skip repository setup if MariaDB 10.x is installed to avoid upgrade conflicts
- Prevents 'PREIN scriptlet failed' error when installer tries to upgrade
- Uses existing MariaDB installation if detected
2026-01-26 21:41:39 +01:00
master3395
9ba66d8c04 Fix MariaDB installation in fix_almalinux9_comprehensive to check for existing installation
- Check for existing MariaDB before attempting installation
- Prevents upgrade errors when MariaDB 10.x is already installed
- Skips installation if MariaDB is already present
- Fixes 'PREIN scriptlet failed' error during installation
2026-01-26 21:36:06 +01:00
master3395
17421b6dfe Fix v2.5.5-dev installation issues: handle curl execution and MariaDB upgrade attempts
- Fix install.sh to detect curl/wget execution and clone repo before loading modules
- Add MariaDB detection and upgrade attempt logic in install.py
- Attempt MariaDB 12.1 upgrade first, fallback to existing 10.x if blocked
- Add comprehensive error handling and logging for upgrade attempts
- Update documentation with fix details
2026-01-26 20:39:25 +01:00
Master3395
c3abff58f4 Download CDN libraries locally to eliminate tracking prevention warnings. Updated index.html to reference local copies of qrious.min.js and chart.umd.min.js. Added functionality in install.py and upgrade.py to download these libraries before running collectstatic. Updated website.html to ensure compatibility with the new local scripts. 2026-01-01 05:29:46 +01:00
Master3395
e693afab8a Enhance venvsetup.sh to conditionally create timezone.ini file
- Added logic to check for the successful installation of the timezonedb extension before creating the corresponding .ini file.
- Implemented a check to verify the existence of timezonedb.so in the PHP extension directory, improving the robustness of the installation process.

These changes ensure that the timezone configuration is only applied when the extension is available, enhancing the reliability of the setup script.
2025-12-31 22:44:58 +01:00
Master3395
dc8bc57b35 Randomize acme.sh cron schedule in installation and upgrade scripts to prevent traffic spikes to Let's Encrypt. Added logic to generate random hour and minute for cron job entries, enhancing the installation process. 2025-12-31 22:26:50 +01:00
Master3395
ff382f2d78 Implement Catch-All Email Configuration Management
- Added new model `CatchAllEmail` to store catch-all email configurations per domain.
- Implemented views for fetching, saving, and deleting catch-all email configurations, enhancing email management capabilities.
- Updated URL routing to include endpoints for catch-all email operations.
- Enhanced error handling and permission checks for email forwarding actions.

These changes improve the flexibility and user experience of email management within CyberPanel.
2025-12-31 22:18:33 +01:00
Master3395
f8a2370336 Implement dynamic PHP version detection and configuration updates
- Added a new function `detect_default_php` to dynamically determine the default PHP version based on symlink and available versions, enhancing compatibility with PHP 7.4-8.5.
- Updated `phpmyadmin_limits` to utilize the detected PHP version for configuration changes, ensuring accurate parameter adjustments for the current PHP environment.
- Enhanced installation scripts for Redis and Memcached extensions to support PHP versions 7.4-8.5, improving backward compatibility and installation reliability.
- Improved error handling for missing PHP configuration files, providing clearer feedback to users.

These changes enhance the flexibility and robustness of PHP management within CyberPanel.
2025-12-17 19:48:28 +01:00
Master3395
7c692ab250 Implement .htaccess feature banner and extraction support in file manager
- Added a new fixed position banner in the index.html to announce .htaccess support, including styling and functionality for showing and dismissing the notification.
- Enhanced file manager to support extraction of 7z and rar file formats, with appropriate command handling in filemanager.py.
- Updated JavaScript files to determine extraction types based on file extensions, ensuring compatibility with new formats.
- Modified HTML templates to include options for 7z and rar compression types in the user interface.
https://github.com/usmannasir/cyberpanel/issues/1617#issue-3727006951

These changes improve user experience by providing clear notifications and expanding file management capabilities within CyberPanel.
2025-12-17 19:19:00 +01:00
Master3395
b6528bb21d Enhance Postfix management and validation in installation scripts
- Refactored the enableDisableEmail function to improve handling of Postfix service enabling and disabling, including better error logging and cleanup of stale marker files.
- Added a new method in mailUtilities to check if Postfix is installed, ensuring that DKIM setup only proceeds if Postfix is available.
- Updated virtualHostUtilities to verify Postfix installation before attempting DKIM setup, with appropriate logging for missing markers.
- Improved overall robustness of email service management during installation and configuration processes.

https://github.com/usmannasir/cyberpanel/issues/1570
2025-11-02 20:29:45 +01:00
usmannasir
5dae7583bb Fix MySQL password file permissions for cyberpanel group access
- Set proper ownership (root:cyberpanel) and permissions (640) on /etc/cyberpanel/mysqlPassword
- Ensures cyberpanel group can read the password file to prevent permission denied errors
- Falls back to root-only permissions if cyberpanel group doesn't exist yet
- Also fixes permissions on existing password files during installation
2025-10-03 16:43:31 +05:00
usmannasir
e34958a05f Move CyberPanel account setup earlier in installation process
Account creation now happens immediately after Python version check, before other system operations. This ensures system users are available for subsequent installation steps.
2025-10-03 15:55:40 +05:00
usmannasir
93252c6662 Fix PowerDNS installation in v2.5.5-dev branch
Added missing PowerDNS configuration setup that was present in v2.4.4:
- Added installPowerDNSConfigurations() method to properly copy and configure pdns.conf
- Fixed PowerDNS installation to call configuration method after package installation
- Updated fixAndStartPowerDNS() to copy config template if missing
- Added proper MySQL password configuration for PowerDNS backend
- Added errno import for proper error handling

This fixes PowerDNS installation failures by ensuring the configuration file is properly created and configured with database credentials.
2025-10-01 12:31:01 +05:00
usmannasir
d5258ac85b fix static file permissions 2025-10-01 11:46:58 +05:00
usmannasir
80c68d4123 bug fix: login page issue 2025-10-01 03:18:39 +05:00
usmannasir
16828b74aa bug fix: login page issue 2025-10-01 02:33:55 +05:00
usmannasir
de892ee4fd find was deleting important env files 2025-10-01 00:45:40 +05:00
usmannasir
6cbcc2862f bug fix: remove migrations commands 2025-10-01 00:20:05 +05:00
usmannasir
0e59310810 bug fix: remove migrations commands 2025-09-30 23:46:10 +05:00
usmannasir
fa039448e0 find was deleting important env files 2025-09-30 16:27:14 +05:00
usmannasir
77be45d692 bug fixes to isntall code 2025-09-29 12:42:27 +05:00