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
Bobgy and alexec authored Jun 30, 2021
1 parent f79d169 commit 05c901f
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 @@ -17,7 +17,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 05c901f

Please sign in to comment.