(Yes I have checked other answers, and this has nothing to do with line endings.)
I am getting the following subprocess error deploying Passenger on nginx. This is on FreeBSD-11.1:
env: bash: No such file or directory
Very strange. The nginx process starts up as root, then moves to nobody, whose shell I have indeed changed to /usr/local/bin/bash. How either of these users can't see bash is strange. But their reported paths don't include /usr/local/bin:
The root environment:
uid=0(root) gid=0(wheel) groups=0(wheel),5(operator)
SERVER_SOFTWARE=nginx/1.14.0 Phusion_Passenger/5.3.4
PASSENGER_USE_FEEDBACK_FD=true
PATH=/sbin:/bin:/usr/sbin:/usr/bin
PWD=/
HOME=/
RC_PID=1360
And for nobody:
uid=65534(nobody) gid=65534(nobody) groups=65534(nobody)
PYTHONUNBUFFERED=1
PASSENGER_SPAWN_WORK_DIR=/tmp/passenger.spawn.lJk10nqveb
RC_PID=1360
PASSENGER_USE_FEEDBACK_FD=true
NODE_PATH=/usr/local/lib/ruby/gems/2.5/gems/passenger/src/nodejs_supportlib
NODE_ENV=production
USER=nobody
PWD=/usr/local/www/pneb
HOME=/nonexistent
PASSENGER_APP_ENV=production
RAILS_ENV=production
SHELL=/usr/local/bin/bash
RACK_ENV=production
SHLVL=0
IN_PASSENGER=1
WSGI_ENV=production
LOGNAME=nobody
PATH=/sbin:/bin:/usr/sbin:/usr/bin
SERVER_SOFTWARE=nginx/1.14.0 Phusion_Passenger/5.3.4
Neither of these users can see bash. I'm not sure which is throwing the error.
How can I get past this issue? I expect Passenger working with nginx to be able to see shells.
Solved, thanks to Charles Duffy in chat:
Add the following to the nginx launcher at /usr/local/etc/rc.d/nginx:
PATH=$PATH:/usr/local/bin
This gives nginx a PATH to see bash.
Thanks. This solve my problem by running this in the .zsh terminal
Open .zshrc by running $ nano .zshrc then Added this to the file: PATH=$PATH:/usr/local/bin:$PATH
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With