Skip to content

Commit

Permalink
engine: resources: file: Remove Validate owner/group Checks
Browse files Browse the repository at this point in the history
The owner/group of a file should not be validated on the host until runtime. This removes the checks in Validate() that were happening before the execution of the resource graph (and therefore bound to fail if the system was being bootstrapped).
  • Loading branch information
cianyleow committed Jun 17, 2024
1 parent 3c661ab commit 09e53bf
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions engine/resources/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,13 +352,6 @@ func (obj *FileRes) Validate() error {
return fmt.Errorf("can't set Owner or Group on this platform")
}
}
if _, err := engineUtil.GetUID(obj.Owner); obj.Owner != "" && err != nil {
return err
}

if _, err := engineUtil.GetGID(obj.Group); obj.Group != "" && err != nil {
return err
}

// TODO: should we silently ignore this error or include it?
//if obj.State == FileStateAbsent && obj.Mode != "" {
Expand Down

0 comments on commit 09e53bf

Please sign in to comment.