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

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

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
}