From cef81982d9d19a37bdc2f170cb4bcef1c0053e77 Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Wed, 13 May 2020 21:42:16 +0500 Subject: [PATCH] ftp fix for ubuntu 20 --- cyberpanel_upgrade.sh | 2 +- install/installCyberPanel.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cyberpanel_upgrade.sh b/cyberpanel_upgrade.sh index 6a1eb9c25..2f49f7edf 100644 --- a/cyberpanel_upgrade.sh +++ b/cyberpanel_upgrade.sh @@ -192,7 +192,7 @@ elif echo $OUTPUT | grep -q "Ubuntu 18.04" ; then echo -e "\nDetecting Ubuntu 18.04...\n" SERVER_OS="Ubuntu" elif echo $OUTPUT | grep -q "Ubuntu 20.04" ; then - echo -e "\nDetecting Ubuntu 18.04...\n" + echo -e "\nDetecting Ubuntu 20.04...\n" SERVER_OS="Ubuntu" UBUNTU_20="True" else diff --git a/install/installCyberPanel.py b/install/installCyberPanel.py index 7fca30c94..ec9bd9974 100755 --- a/install/installCyberPanel.py +++ b/install/installCyberPanel.py @@ -409,8 +409,11 @@ class InstallCyberPanel: except: logging.InstallLog.writeToFile("[ERROR] Could not create directory for FTP SSL") + if (self.distro == centos or self.distro == cent8) or (self.distro == ubuntu and get_Ubuntu_release() == 18.14): + command = 'openssl req -newkey rsa:1024 -new -nodes -x509 -days 3650 -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com" -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem' + else: + command = 'openssl req -x509 -nodes -days 7300 -newkey rsa:2048 -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com" -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem' - command = 'openssl req -newkey rsa:1024 -new -nodes -x509 -days 3650 -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com" -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem' install.preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) os.chdir(self.cwd)