Skip to content

Commit

Permalink
fix(executor): emissary - make argoexec executable from non-root cont…
Browse files Browse the repository at this point in the history
…ainers. Fixes #6238 (#6247)

Signed-off-by: Yuan Gong <gongyuan94@gmail.com>

Co-authored-by: Alex Collins <alexec@users.noreply.github.com>
  • Loading branch information
2 people authored and sarabala1979 committed Aug 4, 2021
1 parent 247776d commit 3dbee0e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion workflow/executor/emissary/binary.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ func copyBinary() error {
return err
}
defer func() { _ = in.Close() }()
out, err := os.OpenFile("/var/run/argo/argoexec", os.O_RDWR|os.O_CREATE, 0o500) // r-x------
// argoexec needs to be executable from non-root user in the main container.
// Therefore we set permission 0o555 == r-xr-xr-x.
out, err := os.OpenFile("/var/run/argo/argoexec", os.O_RDWR|os.O_CREATE, 0o555)
if err != nil {
return err
}
Expand Down

0 comments on commit 3dbee0e

Please sign in to comment.