CentOs7 + Nginx 1.16.0 + Mysql + php 7.1 (fpm, cgi) installation problems

Need help installing Joomla! 3.x? For all Joomla! 3.x installation issues please use this forum.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Post Reply
Ansible
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Sat Jun 15, 2019 8:21 am

CentOs7 + Nginx 1.16.0 + Mysql + php 7.1 (fpm, cgi) installation problems

Post by Ansible » Sat Jun 15, 2019 8:44 am

Hello everyone!
I Try install Joomla 3.9.8, on Centos 7 amd64 with nginx like web server. I don't understand what permissions I must give on all folder and files in web root directory?
In administrate panel - I have all not writeable warnings reports, what can be... :laugh: in all directory what need for good work Joomla.

And is it strange for me!
Because all directory`s have permission 755, owner nginx and owner group nginx (I try give root group - not help for me) and files haves 644 permissions in project directory.

Code: Select all

drwxr-xr-x. 17 nginx nginx  4096 июн 16 05:59 .
drwxrwxr-x.  4 nginx nginx    41 июн 16 04:33 ..
drwxr-xr-x. 11 nginx nginx   159 июн 12 06:57 administrator
drwxr-xr-x.  2 nginx nginx    44 июн 12 06:57 bin
drwxr-xr-x.  2 nginx nginx    24 июн 12 06:57 cache
drwxr-xr-x.  2 nginx nginx   169 июн 12 06:57 cli
drwxr-xr-x. 20 nginx nginx  4096 июн 12 06:57 components
-r--r--r--.  1 nginx nginx  3159 июн 16 05:59 configuration.php
-rw-r--r--.  1 nginx nginx  3151 июн 12 06:57 htaccess.txt
drwxr-xr-x.  5 nginx nginx   118 июн 12 06:57 images
drwxr-xr-x.  2 nginx nginx    64 июн 12 06:57 includes
-rw-r--r--.  1 nginx nginx  1420 июн 12 06:57 index.php
drwxr-xr-x.  4 nginx nginx    54 июн 12 06:57 language
drwxr-xr-x.  5 nginx nginx    70 июн 12 06:57 layouts
drwxr-xr-x. 12 nginx nginx   266 июн 12 06:57 libraries
-rw-r--r--.  1 nginx nginx 18092 июн 12 06:57 LICENSE.txt
drwxr-xr-x. 30 nginx nginx  4096 июн 12 06:57 media
drwxr-xr-x. 27 nginx nginx  4096 июн 12 06:57 modules
drwxr-xr-x. 19 nginx nginx  4096 июн 12 06:57 plugins
-rw-r--r--.  1 nginx nginx  4883 июн 12 06:57 README.txt
-rw-r--r--.  1 nginx nginx   829 июн 12 06:57 robots.txt.dist
drwxr-xr-x.  5 nginx nginx    68 июн 12 06:57 templates
drwxr-xr-x.  2 nginx nginx    24 июн 12 06:57 tmp
-rw-r--r--.  1 nginx nginx  1859 июн 12 06:57 web.config.txt
My tail error.log

I modify log echo a little (ip.add.re.ss - is it modify)

Code: Select all

2019/06/16 06:13:15 [error] 28154#28154: *52 FastCGI sent in stderr: "PHP message: PHP Warning:  file_put_contents(/usr/share/nginx/ip.add.re.ss/administrator/logs/error.php): failed to open stream: Permission denied in /usr/share/nginx/ip.add.re.ss/libraries/src/Filesystem/File.php on line 450" while reading response header from upstream, client: ip.add.re.ss, server: ip.add.re.ss, request: "POST /index.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "ip.add.re.ss", referrer: "http://ip.add.re.ss/"
2019/06/16 06:14:10 [warn] 28154#28154: *56 an upstream response is buffered to a temporary file /var/cache/nginx/fastcgi_temp/2/00/0000000002 while reading upstream, client: ip.add.re.ss, server: ip.add.re.ss, request: "GET /administrator/index.php?option=com_admin&view=sysinfo HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "ip.add.re.ss", referrer: "http://ip.add.re.ss/administrator/index.php?option=com_postinstall&eid=700"
2019/06/16 06:14:32 [info] 28154#28154: *57 client closed connection while waiting for request, client: ip.add.re.ss, server: 0.0.0.0:80
And finally report in admin panel:

Code: Select all

plugins/search	Unwritable
plugins/installer	Unwritable
plugins/finder	Unwritable
plugins/user	Unwritable
plugins/editors	Unwritable
plugins/sampledata	Unwritable
plugins/twofactorauth	Unwritable
plugins/system	Unwritable
plugins/editors-xtd	Unwritable
plugins/authentication	Unwritable
plugins/quickicon	Unwritable
plugins/privacy	Unwritable
plugins/extension	Unwritable
plugins/fields	Unwritable
plugins/captcha	Unwritable
plugins/content	Unwritable
templates	Unwritable
configuration.php	Unwritable
cache (Cache Folder)	Unwritable
administrator/cache (Cache Folder)	Unwritable
/usr/share/nginx/ip.add.re.ss/administrator/logs (Log folder)	Unwritable
/usr/share/nginx/ip.add.re.ss/tmp (Temp folder)	Unwritable

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 25956
Joined: Mon Oct 27, 2008 9:27 pm
Location: Akershus, Norway

Re: CentOs7 + Nginx 1.16.0 + Mysql + php 7.1 (fpm, cgi) installation problems

Post by Per Yngve Berg » Sat Jun 15, 2019 11:58 am

https://docs.joomla.org/Nginx

I made a Linux user for the site and made the fpm-cgi process run as that user.

Ansible
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Sat Jun 15, 2019 8:21 am

Re: CentOs7 + Nginx 1.16.0 + Mysql + php 7.1 (fpm, cgi) installation problems

Post by Ansible » Tue Jun 18, 2019 12:27 am

Per Yngve Berg wrote:
Sat Jun 15, 2019 11:58 am
https://docs.joomla.org/Nginx

I made a Linux user for the site and made the fpm-cgi process run as that user.
Can you write how you do with? Step by step please.

Swisstaz
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Aug 02, 2019 11:38 am

Re: CentOs7 + Nginx 1.16.0 + Mysql + php 7.1 (fpm, cgi) installation problems

Post by Swisstaz » Fri Aug 02, 2019 12:10 pm

On CentOs 7 I found out that there is another issue. Be aware of SELINUX.

ryansenn
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Fri Aug 02, 2019 3:12 pm
Contact:

Re: CentOs7 + Nginx 1.16.0 + Mysql + php 7.1 (fpm, cgi) installation problems

Post by ryansenn » Fri Aug 02, 2019 3:24 pm

I've had SELINUX play up in the past as well. However be careful when following online blog posts or similar to turn it off, some are pretty carefree in their recommendations and you can put your server at risk.

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 25956
Joined: Mon Oct 27, 2008 9:27 pm
Location: Akershus, Norway

Re: CentOs7 + Nginx 1.16.0 + Mysql + php 7.1 (fpm, cgi) installation problems

Post by Per Yngve Berg » Mon Aug 12, 2019 5:20 pm

https://www.howtoforge.com/php-fpm-ngin ... ian-ubuntu

Here is where you have it wrong.
The important part is the line fastcgi_pass 127.0.0.1:9000; - this makes nginx pass PHP requests to the PHP-FPM process listening on port 9000 on localhost (127.0.0.1) - as you remember, this is our pool defined in /etc/php5/fpm/pool.d/www.conf which means PHP scripts are executed as the user and group www-data.


Post Reply

Return to “Installation Joomla! 3.x”