修改backup,目录没权限扔可以备份
This commit is contained in:
@ -130,7 +130,8 @@ class ErrorCode():
|
||||
"permission of %s.",
|
||||
'GAUSS_50109': "[GAUSS-50109] : Only a user with the root permission "
|
||||
"can check SSD information.",
|
||||
'GAUSS_50110': "[GAUSS-50110] : Cannot execute this script on %s."
|
||||
'GAUSS_50110': "[GAUSS-50110] : Cannot execute this script on %s.",
|
||||
'GAUSS_50111': "[GAUSS-50111] : The %s directory has no permission."
|
||||
}
|
||||
|
||||
###########################################################################
|
||||
|
@ -223,6 +223,10 @@ class LocalBackup(LocalBaseOM):
|
||||
ErrorCode.GAUSS_502["GAUSS_50208"] % self.backupDir
|
||||
+ " Error:\n%s" % e)
|
||||
|
||||
if (not os.access(self.backupDir, os.R_OK | os.W_OK)):
|
||||
raise Exception(
|
||||
ErrorCode.GAUSS_501["GAUSS_50111"] % self.backupDir)
|
||||
|
||||
self.logger.log("Successfully checked backup directory.")
|
||||
|
||||
def doBackup(self):
|
||||
|
Reference in New Issue
Block a user