c8d/mount: Create same directory owners as graphdrivers
Graph drivers create the parent directory with rootPair().GID:CurrentIdentity().UID owner. This change brings these in line Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
This commit is contained in:
parent
6ce5aa1cd5
commit
833b514d98
1 changed files with 7 additions and 1 deletions
|
@ -93,7 +93,13 @@ func (m *refCountMounter) Mount(mounts []mount.Mount, containerID string) (targe
|
|||
}()
|
||||
|
||||
root := m.idMap.RootPair()
|
||||
if err := idtools.MkdirAllAndChown(target, 0o700, root); err != nil {
|
||||
if err := idtools.MkdirAllAndChown(filepath.Dir(target), 0o710, idtools.Identity{
|
||||
UID: idtools.CurrentIdentity().UID,
|
||||
GID: root.GID,
|
||||
}); err != nil {
|
||||
return "", err
|
||||
}
|
||||
if err := idtools.MkdirAllAndChown(target, 0o710, root); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue