Skip to content

Commit

Permalink
machine: Fix upload of /tmp/routes-controller.json
Browse files Browse the repository at this point in the history
After the CopyData/CopyDataPrivileged changes, copying
routes-controller.json to the VM fails with 'Permission denied'.
This seems to be related to the file being created as 0444, and the copy
now being done as a regular user rather than through sudo. This commit
changes the permissions of the uploaded file to 0644 to fix this issue.
  • Loading branch information
cfergeau authored and anjannath committed Jun 24, 2022
1 parent 8ac31f8 commit 5861efd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/crc/machine/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,7 @@ func ensureRoutesControllerIsRunning(sshRunner *crcssh.Runner, ocConfig oc.Confi
if err != nil {
return err
}
if err := sshRunner.CopyData(bin, "/tmp/routes-controller.json", 0444); err != nil {
if err := sshRunner.CopyData(bin, "/tmp/routes-controller.json", 0644); err != nil {
return err
}
_, _, err = ocConfig.RunOcCommand("apply", "-f", "/tmp/routes-controller.json")
Expand Down

0 comments on commit 5861efd

Please sign in to comment.