cloudstack-setup-databases: fix mode and group of key file (#10466)

This commit is contained in:
Wei Zhou 2025-02-28 06:14:31 +01:00 committed by GitHub
parent f0179855f5
commit f50de8981a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -402,6 +402,8 @@ for example:
except IOError as e:
msg = "Failed to save management server secret key file %s due to %s, also please check the default umask"%(self.encryptionKeyFile, e.strerror)
self.errorAndExit(msg)
os.chmod(self.encryptionKeyFile, 0o640)
shutil.chown(self.encryptionKeyFile, user=None, group="cloud")
def formatEncryptResult(value):
return 'ENC(%s)'%value