native: set '/' permission to 0755

Unlike other snapshotters, the permission was previously set to 0700
unexpectedly.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
This commit is contained in:
Akihiro Suda
2018-07-23 16:14:55 +09:00
parent 0d52c71c80
commit 7461739b58
2 changed files with 19 additions and 0 deletions

View File

@@ -251,6 +251,9 @@ func (o *snapshotter) createSnapshot(ctx context.Context, kind snapshots.Kind, k
if err != nil {
return nil, errors.Wrap(err, "failed to create temp dir")
}
if err := os.Chmod(td, 0755); err != nil {
return nil, errors.Wrapf(err, "failed to chmod %s to 0755", td)
}
defer func() {
if err != nil {
if td != "" {