Set umask to 0000 while overlays are being built. Fixes #584
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"strings"
|
||||
"syscall"
|
||||
"text/template"
|
||||
|
||||
"github.com/hpcng/warewulf/internal/pkg/node"
|
||||
@@ -197,6 +198,9 @@ func BuildOverlayIndir(nodeInfo node.NodeInfo, overlayNames []string, outputDir
|
||||
return errors.Errorf("overlay names contains illegal characters: %v", overlayNames)
|
||||
}
|
||||
|
||||
// Temporarily set umask to 0000, so directories in the overlay retain permissions
|
||||
defer syscall.Umask(syscall.Umask(0))
|
||||
|
||||
wwlog.Verbose("Processing node/overlay: %s/%s", nodeInfo.Id.Get(), strings.Join(overlayNames, "-"))
|
||||
for _, overlayName := range overlayNames {
|
||||
wwlog.Verbose("Building overlay %s for node %s in %s", overlayName, nodeInfo.Id.Get(), outputDir)
|
||||
|
||||
Reference in New Issue
Block a user