mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-10 15:26:13 +01:00
bug fix in ftp creation for ubuntu 20: https://community.cyberpanel.net/t/bug-ftp-create-account-error/42688
This commit is contained in:
@@ -505,7 +505,7 @@ class InstallCyberPanel:
|
||||
install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
|
||||
|
||||
|
||||
if get_Ubuntu_release() > 20:
|
||||
if int(get_Ubuntu_release()) > 20:
|
||||
### change mysql md5 to crypt
|
||||
|
||||
command = "sed -i 's/MYSQLCrypt md5/MYSQLCrypt crypt/g' /etc/pure-ftpd/db/mysql.conf"
|
||||
|
||||
@@ -155,6 +155,7 @@ class FTPUtilities:
|
||||
|
||||
admin = Administrator.objects.get(userName=owner)
|
||||
|
||||
|
||||
if api == '0':
|
||||
userName = admin.userName + "_" + userName
|
||||
|
||||
|
||||
@@ -167,8 +167,9 @@ class ProcessUtilities(multi.Thread):
|
||||
distroPath = '/etc/lsb-release'
|
||||
|
||||
if os.path.exists(distroPath):
|
||||
|
||||
## this is check only
|
||||
if open(distroPath, 'r').read().find('22.04'):
|
||||
if open(distroPath, 'r').read().find('22.04') > -1:
|
||||
ProcessUtilities.ubuntu22Check = 1
|
||||
|
||||
if open(distroPath, 'r').read().find('20.04') > -1 or open(distroPath, 'r').read().find('22.04'):
|
||||
|
||||
@@ -1136,12 +1136,6 @@ CREATE TABLE `websiteFunctions_backupsv2` (`id` integer AUTO_INCREMENT NOT NULL
|
||||
|
||||
if Upgrade.FindOperatingSytem() == Ubuntu22:
|
||||
|
||||
try:
|
||||
cursor.execute(
|
||||
'ALTER TABLE `users` CHANGE `Password` `Password` VARCHAR(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL; ')
|
||||
except:
|
||||
pass
|
||||
|
||||
command = "sed -i 's/MYSQLCrypt md5/MYSQLCrypt crypt/g' /etc/pure-ftpd/db/mysql.conf"
|
||||
Upgrade.executioner(command, command, 1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user