mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 13:56:01 +01:00
Fix permissions via Filemanager and forward compatible Backups!
This commit is contained in:
@@ -68,14 +68,10 @@ class mysqlUtilities:
|
||||
|
||||
if res == 1:
|
||||
logging.CyberCPLogFileWriter.writeToFile("Can not create Database User: " + dbuser)
|
||||
|
||||
## reverting the db creation which was created earlier
|
||||
|
||||
mysqlUtilities.deleteDatabase(dbname,dbuser)
|
||||
|
||||
return 0
|
||||
else:
|
||||
|
||||
dropDB = "GRANT ALL PRIVILEGES ON " +dbname+ ".* TO '" +dbuser+ "'@'localhost'"
|
||||
command = 'sudo mysql -u root -p' + password + ' -e "' + dropDB + '"'
|
||||
cmd = shlex.split(command)
|
||||
@@ -86,7 +82,6 @@ class mysqlUtilities:
|
||||
logging.CyberCPLogFileWriter.writeToFile("Can not grant privileges to user: " + dbuser)
|
||||
return 0
|
||||
|
||||
|
||||
return 1
|
||||
|
||||
except BaseException, msg:
|
||||
@@ -147,10 +142,12 @@ class mysqlUtilities:
|
||||
|
||||
if res == 1:
|
||||
logging.CyberCPLogFileWriter.writeToFile("Database: "+databaseName + "could not be backed! [createDatabaseBackup]")
|
||||
return 0
|
||||
|
||||
return 1
|
||||
except BaseException, msg:
|
||||
logging.CyberCPLogFileWriter.writeToFile(str(msg) + "[createDatabase]")
|
||||
return 0
|
||||
|
||||
@staticmethod
|
||||
def restoreDatabaseBackup(databaseName, tempStoragePath,dbPassword):
|
||||
|
||||
Reference in New Issue
Block a user