I'm an intermediate Linux user (CentOS, some Debian) who is transitioning to FreeBSD (10). Permissions have always been somewhat confusing to me.
I've set up a server with PHP-FPM (5.6) and Nginx (1.8.0). They run as the 'www' user.
Any command I try to run in a script from the browser, such as 'whoami', 'uname -a', 'which php', or '/usr/local/bin/php /usr/local/www/nginx/feeds/news_feed.php' all return the 127 error code.
I've wracked my brain Googling for hours and I have a feeling this is due to permissions. The only problem is most threads relate to Linux and most have the person marking it as solved without explaining what actually was wrong.
So, how can I tell what my webserver's path is, how can I fix it, and how do I set permissions properly without making my system vulnerable?
I understand this may be by design or have to do with jails, but there must be a way to run exec() or similar commands?