mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-06-03 01:44:53 +00:00
Add config permissions
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
This commit is contained in:
parent
6e1d761ded
commit
287c64cdcb
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user