mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-08-31 16:39:20 +00:00
Add config permissions
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
This commit is contained in:
@@ -94,6 +94,7 @@ const (
|
||||
// Default directory and file fileModes
|
||||
DirPerm = os.ModeDir | os.ModePerm
|
||||
FilePerm = 0666
|
||||
ConfigPerm = 0640 // Used for config files that contain secrets or other sensitive data
|
||||
NoWriteDirPerm = 0555 | os.ModeDir
|
||||
TempDirPerm = os.ModePerm | os.ModeSticky | os.ModeDir
|
||||
|
||||
|
@@ -401,7 +401,7 @@ func (e *Elemental) CopyCloudConfig(cloudInit []string) (err error) {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err = e.config.Fs.Chmod(customConfig, cnst.FilePerm); err != nil {
|
||||
if err = e.config.Fs.Chmod(customConfig, cnst.ConfigPerm); err != nil {
|
||||
e.config.Logger.Debugf("Error on chmod %s: %s\n", customConfig, err.Error())
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user