Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

Commit

Permalink
[5.5] Use non-recursive chown during upgrade. (#366)
Browse files Browse the repository at this point in the history
  • Loading branch information
r0mant authored Apr 15, 2019
1 parent 169e584 commit 3379dab
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/ops/opsservice/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,14 @@ func remoteDirectories(operation ops.SiteOperation, server *ProvisionedServer, m
}
if mount.UID != nil || mount.GID != nil {
expr := chownExpr(mount.UID, mount.GID)
commands = append(commands,
Cmd([]string{"chown", expr, mount.Source}, "setting ownership of %v to %v", mount.Source, expr),
)
commands = append(commands, Cmd(
[]string{"chown", expr, mount.Source},
"setting ownership of %v to %v", mount.Source, expr))
} else {
// set standard ownership
chownList = append(chownList, mount.Source)
commands = append(commands, Cmd(
[]string{"chown", fmt.Sprintf("%v:%v", uid, gid), mount.Source},
"setting ownership of %v to %v:%v", mount.Source, uid, gid))
}
if mount.Mode != "" {
commands = append(commands,
Expand Down

0 comments on commit 3379dab

Please sign in to comment.