Remove .chowned file to restore ownership of files when restore from snapshot
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Adam Štrauch 2021-11-01 21:30:08 +01:00
parent 4e56ab7657
commit 564e9ec4f1
Signed by: cx
GPG Key ID: 018304FFA8988F8D
1 changed files with 6 additions and 0 deletions

View File

@ -224,6 +224,12 @@ func (s *SnapshotProcessor) RestoreSnapshot(key string, newAppName string) error
return fmt.Errorf("removing the archive error: %v", err)
}
// remove .chowned file to tell the container to setup ownership of the files again
err = os.Remove("./.chowned")
if err != nil {
return fmt.Errorf("removing .chowned error: %v", err)
}
return nil
}