lib, engine: graph: Let children directories be readable
We want to be able to put useful scripts in $vardir type places, but if the perms at the higher levels block this, then that can't work. The top-level should always be more permissive, and then it grows more restricted as we descend.
This commit is contained in:
@@ -54,7 +54,8 @@ func (obj *State) varDir(extra string) (string, error) {
|
||||
|
||||
// an empty string at the end has no effect
|
||||
p := fmt.Sprintf("%s/", path.Join(obj.Prefix, extra))
|
||||
if err := os.MkdirAll(p, 0770); err != nil {
|
||||
// 0775 since we want children to be able to read this!
|
||||
if err := os.MkdirAll(p, 0775); err != nil {
|
||||
return "", errwrap.Wrapf(err, "can't create prefix in: %s", p)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user