Running Python Script from PHP as www-data

The problem Python script invoked from PHP via shell_exec and runs fine when PHP invoked from command line but fails when PHP triggered by browser access. Reason PHP, when triggered by a browser access is invoked by web server with the user www-data, while from the command line it is run as user ubuntu. Attempting …

Continue reading ‘Running Python Script from PHP as www-data’ »