Write files to runtime dir with write permissions, so they can be overwritten by the restartLoop
This commit is contained in:
parent
691727fe99
commit
fdfae9c49a
@ -137,7 +137,7 @@ func nebulaPmuxProcConfig(
|
|||||||
|
|
||||||
nebulaYmlPath := filepath.Join(runtimeDirPath, "nebula.yml")
|
nebulaYmlPath := filepath.Join(runtimeDirPath, "nebula.yml")
|
||||||
|
|
||||||
if err := yamlutil.WriteYamlFile(config, nebulaYmlPath, 0440); err != nil {
|
if err := yamlutil.WriteYamlFile(config, nebulaYmlPath, 0600); err != nil {
|
||||||
return pmuxlib.ProcessConfig{}, fmt.Errorf("writing nebula.yml to %q: %w", nebulaYmlPath, err)
|
return pmuxlib.ProcessConfig{}, fmt.Errorf("writing nebula.yml to %q: %w", nebulaYmlPath, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ func RenderGarageToml(into io.Writer, data GarageTomlData) error {
|
|||||||
func WriteGarageTomlFile(path string, data GarageTomlData) error {
|
func WriteGarageTomlFile(path string, data GarageTomlData) error {
|
||||||
|
|
||||||
file, err := os.OpenFile(
|
file, err := os.OpenFile(
|
||||||
path, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0640,
|
path, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0600,
|
||||||
)
|
)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user