Skip to content

Commit 03def87

Browse files
mafredrijohnstcn
authored andcommitted
fix: use openfile to explicitly set magic image perms (#370)
(cherry picked from commit 0a11dad)
1 parent 9ee20e7 commit 03def87

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

envbuilder.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1596,7 +1596,7 @@ func copyFile(fs billy.Filesystem, src, dst string, mode fs.FileMode) error {
15961596
}
15971597

15981598
func writeMagicImageFile(fs billy.Filesystem, path string, v any) error {
1599-
file, err := fs.Create(path)
1599+
file, err := fs.OpenFile(path, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0o644)
16001600
if err != nil {
16011601
return fmt.Errorf("create magic image file: %w", err)
16021602
}

0 commit comments

Comments
 (0)