Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change chef linux provisioner to use user:group chown syntax #18533

Merged
merged 1 commit into from
Oct 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions builtin/provisioners/chef/linux_provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func (p *provisioner) linuxCreateConfigFiles(o terraform.UIOutput, comm communic
if err := p.runCommand(o, comm, fmt.Sprintf(chmod, hintsDir, 600)); err != nil {
return err
}
if err := p.runCommand(o, comm, "chown -R root.root "+hintsDir); err != nil {
if err := p.runCommand(o, comm, "chown -R root:root "+hintsDir); err != nil {
return err
}
}
Expand All @@ -106,7 +106,7 @@ func (p *provisioner) linuxCreateConfigFiles(o terraform.UIOutput, comm communic
if err := p.runCommand(o, comm, fmt.Sprintf(chmod, linuxConfDir, 600)); err != nil {
return err
}
if err := p.runCommand(o, comm, "chown -R root.root "+linuxConfDir); err != nil {
if err := p.runCommand(o, comm, "chown -R root:root "+linuxConfDir); err != nil {
return err
}
}
Expand Down
4 changes: 2 additions & 2 deletions builtin/provisioners/chef/linux_provisioner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,10 @@ func TestResourceProvider_linuxCreateConfigFiles(t *testing.T) {
"sudo " + fmt.Sprintf(chmod, path.Join(linuxConfDir, "ohai/hints"), 666): true,
"sudo chmod 755 " + path.Join(linuxConfDir, "ohai/hints"): true,
"sudo " + fmt.Sprintf(chmod, path.Join(linuxConfDir, "ohai/hints"), 600): true,
"sudo chown -R root.root " + path.Join(linuxConfDir, "ohai/hints"): true,
"sudo chown -R root:root " + path.Join(linuxConfDir, "ohai/hints"): true,
"sudo chmod 755 " + linuxConfDir: true,
"sudo " + fmt.Sprintf(chmod, linuxConfDir, 600): true,
"sudo chown -R root.root " + linuxConfDir: true,
"sudo chown -R root:root " + linuxConfDir: true,
},

Uploads: map[string]string{
Expand Down