nginx and php settings

Mahmood Naderan mahmood.nt at gmail.com
Sat Mar 14 12:24:19 UTC 2020


>fastcgi_param  SCRIPT_FILENAME /usr/local/nginx/html/$fastcgi_script_name;
Done.

>1) Does the fastcgi process (probably user www-data) have permission to
>read your phpinfo.php file?

I see this

root at fr13:/usr/local# ls -lh nginx/
total 36K
drwx------ 2 nobody root 4.0K مارس  13 16:53 client_body_temp
drwxr-xr-x 2 root   root 4.0K مارس  14 15:51 conf
drwx------ 2 nobody root 4.0K مارس  13 16:53 fastcgi_temp
drwxr-xr-x 9 root   root 4.0K مارس  14 11:32 html
drwxr-xr-x 2 root   root 4.0K مارس  14 15:48 logs
drwx------ 2 nobody root 4.0K مارس  13 16:53 proxy_temp
drwxr-xr-x 2 root   root 4.0K مارس  13 16:45 sbin
drwx------ 2 nobody root 4.0K مارس  13 16:53 scgi_temp
drwx------ 2 nobody root 4.0K مارس  13 16:53 uwsgi_temp
root at fr13:/usr/local# ls -lh lib/
total 12K
drwxr-xr-x 15 root root  4.0K مارس  14 11:28 php
drwxrwsr-x  4 root staff 4.0K مارس   5  2019 python2.7
drwxrwsr-x  3 root staff 4.0K مارس   5  2019 python3.4
root at fr13:/usr/local# ls -lh lib/php/
total 132K
drwxr-xr-x  2 root root 4.0K مارس  13 17:34 Archive
drwxr-xr-x  2 root root 4.0K مارس  14 11:19 build
drwxr-xr-x  2 root root 4.0K مارس  13 17:34 Console
drwxr-xr-x  4 root root 4.0K مارس  13 17:34 data
drwxr-xr-x  6 root root 4.0K مارس  13 17:34 doc
drwxr-xr-x  3 root root 4.0K مارس  13 17:41 extensions
drwxr-xr-x  2 root root 4.0K مارس  13 17:34 OS
drwxr-xr-x 11 root root 4.0K مارس  13 17:34 PEAR
-rw-r--r--  1 root root 1.1K مارس  13 17:34 PEAR5.php
-rw-r--r--  1 root root  15K مارس  13 17:34 pearcmd.php
-rw-r--r--  1 root root  34K مارس  13 17:34 PEAR.php
-rw-r--r--  1 root root 1012 مارس  13 17:34 peclcmd.php
-rw-r--r--  1 root root 1.5K مارس  14 00:08 php.ini
drwxr-xr-x  3 root root 4.0K مارس  13 17:34 Structures
-rw-r--r--  1 root root  21K مارس  13 17:34 System.php
drwxr-xr-x  4 root root 4.0K مارس  13 17:34 test
drwxr-xr-x  2 root root 4.0K مارس  13 17:34 XML



Do you mean chown www-data:www-data /usr/lib/local/php/php.ini
?

but the upper directory, php/ is for root.

Regards,
Mahmood
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20200314/5972fc77/attachment.htm>


More information about the nginx mailing list