• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved nginx 403

samson

New Pleskian
Hi,

I've been trying to upgrade magento to 2.4 which entailed adding a user to the group and as a result my LIVE site is now 403 error.

files have been updated to:

chown -R storm:psacln /var/www/vhosts/stormtight.co.uk/httpdocs
chown storm:psaserv /var/www/vhosts/stormtight.co.uk/httpdocs

I've tried update the php fpm to user: storm and group: psacln in file below


vi /etc/php-fpm.d/www.conf.saved_by_psa
service plesk-php56-fpm restart

Here's
ps aux | grep php-fpm
root 15917 0.0 0.0 588636 20864 ? Ss Nov30 0:02 php-fpm: master process (/opt/plesk/php/7.3/etc/php-fpm.conf)
root 23343 0.0 0.0 518060 25712 ? Ss 06:56 0:00 php-fpm: master process (/opt/plesk/php/7.0/etc/php-fpm.conf)
root 25413 0.1 0.0 518516 24636 ? Ss 09:43 0:00 php-fpm: master process (/opt/plesk/php/5.6/etc/php-fpm.conf)
root 26309 0.0 0.0 112812 976 pts/0 S+ 09:44 0:00 grep --color=auto php-fpm

added users to groups

[root@mail httpdocs]# usermod -a -G psacln storm
[root@mail httpdocs]# usermod -a -G psacln nginx
[root@mail httpdocs]# usermod -a -G psacln apache
[root@mail httpdocs]# groups storm
storm : apache psacln
[root@mail httpdocs]# usermod -a -G nginx storm
[root@mail httpdocs]# groups storm#
groups: storm#: no such user
[root@mail httpdocs]# groups storm
storm : apache psacln nginx
[root@mail httpdocs]# service httpd restart
Redirecting to /bin/systemctl restart httpd.service
[root@mail httpdocs]# service nginx restart
Restarting nginx (via systemctl):

[root@mail httpdocs]# groups apache
apache : apache psaserv psacln psasb
[root@mail httpdocs]# groups nginx
nginx : nginx psaserv psacln


The PHP -FPM doesn't appear to be updating the new user of storm

Still have 403 on LIVE site.

Please help me!!!

Kind regards,

Simon
 
Why did you manually modify the permissions of your files and user groups?? This will definitely break your system!
Rule of thumb: Never _ever_ modify permissions and users and groups manually. All permissions and users/groups are handled by Plesk and any manual modification will be overwritten again and may cause a big mess on your server.

You may want to run plesk repair fs followed by plesk repair web as mentioned by @WebHostingAce above. Maybe this fixes your problem.

And then: Explain your objective (what do you want to achieve? And why?) and then figure out how to do that using the tools and functionality provided by Plesk without doing manual modifications.
 
I've fixed the Live site which is running on magento 1.9.3. Error was in the core_config_data table, base urls were oddly set to http and not https for both secure and unsecure, which then caused my additional directives to produce 403 and redirecting too may times.

I've taken note of both your replies and run the repair fs and repair web.

Many thanks for your help!
 
Back
Top