Skip to content

Commit 4f341e0

Browse files
authored
Merge pull request #4145 from norio-nomura/change-file-permission-in-convertRawToRaw
pkg/imgutil/nativeimgutil: Change file permission to 644 in `convertRawToRaw()`
2 parents c71bc48 + acc042c commit 4f341e0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/imgutil/nativeimgutil/nativeimgutil.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ func convertRawToRaw(source, dest string, size *int64) error {
130130
if err := containerdfs.CopyFile(dest, source); err != nil {
131131
return fmt.Errorf("failed to copy %q into %q: %w", source, dest, err)
132132
}
133+
if err := os.Chmod(dest, 0o644); err != nil {
134+
return fmt.Errorf("failed to set permissions on %q: %w", dest, err)
135+
}
133136
}
134137
if size != nil {
135138
logrus.Infof("Expanding to %s", units.BytesSize(float64(*size)))

0 commit comments

Comments
 (0)