From owner-freebsd-questions@freebsd.org Tue Apr 26 19:40:58 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A8D7B19A75 for ; Tue, 26 Apr 2016 19:40:58 +0000 (UTC) (envelope-from stdin@niklaas.eu) Received: from box-fra-01.niklaas.eu (box-fra-01.niklaas.eu [IPv6:2a00:c98:2200:af07:6::1]) by mx1.freebsd.org (Postfix) with ESMTP id 1BCED1E6F for ; Tue, 26 Apr 2016 19:40:57 +0000 (UTC) (envelope-from stdin@niklaas.eu) Received: by box-fra-01.niklaas.eu (Postfix, from userid 1001) id E1D8765D93; Tue, 26 Apr 2016 21:40:48 +0200 (CEST) Date: Tue, 26 Apr 2016 21:40:48 +0200 From: Niklaas Baudet von Gersdorff To: freebsd-questions@freebsd.org Subject: Why is www's $PATH only /usr/bin:/bin? Message-ID: <20160426194048.GA31481@box-fra-01.niklaas.eu> Mail-Followup-To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Apr 2016 19:40:58 -0000 Hi, I figured that www's $PATH is only /usr/bin:/bin. Why is that if /etc/login.conf says the following? default:\ --------8<-------- :path=/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin ~/bin:\ --------8<-------- /etc/passwd looks like this. www:*:80:80:World Wide Web Owner:/nonexistent:/usr/sbin/nologin So, I left everything the default. The thing is that I want to run something in /usr/local/bin with PHP's shell_exec($cmd); but that's not working because it's not in $PATH. Any hint is very much appreciated. Niklaas