When running a bash script on Linux from Octopus, we have noticed that the PATH variable is different than when we login over SSH. For instance /usr/sbin is missing from the path when Octopus runs, but it is present when we login manually. This causes problems with some of our scripts.
Hi Ryan,
Thanks for getting in touch. Is this a Mac target by any chance? If not, which distro are you targeting?
We’ve added a new section to the SSH Targets documentation in the hope of explaining how we bootstrap SSH sessions, which startup script is run (in turn configuring the PATH variable), and how scripts are executed. Can you let me know if this helps clear things up for your situation, and if not what details would have helped?
Look for Bash Startup Files in SSH Targets
Hope that helps!
Mike
This was on a CentOS 6 system. But thank you for that documentation update. That’s exactly what we were looking for!