Change the permission of overlay dir to and generated overlays to

Signed-off-by: xu yang <xyang@ciq.com>
This commit is contained in:
xu yang
2024-09-27 06:23:17 +00:00
committed by Jonathon Anderson
parent 617e1b9e5a
commit d59ace3792
3 changed files with 5 additions and 1 deletions

View File

@@ -136,7 +136,7 @@ func BuildOverlay(nodeInfo node.NodeInfo, context string, overlayNames []string)
overlayImage := OverlayImage(nodeInfo.Id.Get(), context, overlayNames)
overlayImageDir := path.Dir(overlayImage)
err := os.MkdirAll(overlayImageDir, 0755)
err := os.MkdirAll(overlayImageDir, 0750)
if err != nil {
return errors.Wrapf(err, "Failed to create directory for %s: %s", name, overlayImageDir)
}

View File

@@ -543,6 +543,9 @@ func CpioCreate(
args = append(args, cpio_args...)
oldMask := syscall.Umask(007)
defer syscall.Umask(oldMask)
proc := exec.Command("cpio", args...)
stdin, err := proc.StdinPipe()