Skip to content

Commit 89741fd

Browse files
committed
fix(engine): change permissions on the instance_id file and its directory (#389)
1 parent 79acecd commit 89741fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: engine/pkg/config/config.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,11 @@ func LoadInstanceID() (string, error) {
7575
instanceID = xid.New().String()
7676
log.Dbg("no instance_id file was found, generate new instance ID", instanceID)
7777

78-
if err := os.MkdirAll(path.Dir(idFilepath), 0644); err != nil {
78+
if err := os.MkdirAll(path.Dir(idFilepath), 0744); err != nil {
7979
return "", fmt.Errorf("failed to make directory meta: %w", err)
8080
}
8181

82-
return instanceID, os.WriteFile(idFilepath, []byte(instanceID), 0544)
82+
return instanceID, os.WriteFile(idFilepath, []byte(instanceID), 0644)
8383
}
8484

8585
return instanceID, fmt.Errorf("failed to load instanceid, %w", err)

0 commit comments

Comments
 (0)