mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
parent
009dba178f
commit
df909ca3ca
@ -71,12 +71,29 @@ func (p *Provisioner) linuxCreateConfigFiles(
|
||||
return err
|
||||
}
|
||||
|
||||
// Make sure we have enough rights to upload the hints if using sudo
|
||||
if p.useSudo {
|
||||
if err := p.runCommand(o, comm, "chmod 777 "+hintsDir); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if err := p.deployOhaiHints(o, comm, hintsDir); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// When done copying the hints restore the rights and make sure root is owner
|
||||
if p.useSudo {
|
||||
if err := p.runCommand(o, comm, "chmod 755 "+hintsDir); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := p.runCommand(o, comm, "chown -R root.root "+hintsDir); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// When done copying the files restore the rights and make sure root is owner
|
||||
// When done copying all files restore the rights and make sure root is owner
|
||||
if p.useSudo {
|
||||
if err := p.runCommand(o, comm, "chmod 755 "+linuxConfDir); err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user