From ec1732c8ecef807d1a9da467a0322d51039ccc34 Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Thu, 23 Mar 2023 17:45:24 +0000 Subject: [PATCH] Set kernels permissions inside container --- kernel.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/kernel.go b/kernel.go index 3a87704..79be9b5 100644 --- a/kernel.go +++ b/kernel.go @@ -621,11 +621,8 @@ func genDockerKernels(dii dockerImageInfo, newkcfg *config.KernelConfig, } newkcfg.Kernels = append(newkcfg.Kernels, ki) - err = os.Chmod(ki.KernelPath, 0666) - if err != nil { - return - } - err = os.Chmod(ki.InitrdPath, 0666) + cmd := "find /boot -type f -exec chmod 0644 {} \\;" + _, err = c.Run("/tmp", cmd) if err != nil { return }