• 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

WP-toolkit and nginx/php-fpm - user right error

Martin_Sauer

Regular Pleskian
WP-toolkit is unable to update WP-installations. The error is obviously due to user rights of the WP-toolkit compared to vhost user rights compared to file rights.

The error:
The WordPress plugins were updated with errors:
  • Installation "My CMS": Warning: Could not remove the old plugin. {"err_code":0,"err_message":"Updated 0\/1 plugins."}
Configuration:
- nginx and apache
- nginx processes php files via php-fpm

How do I set user rights or what has to be configured to have the WP-toolbox work again?
 
Could you please show me permissions of directory plugins and subdirectories? How these problem plugins have been installed? Can you upgrade these plugins through WP admin panel? Have you managed these WPs with help of any third-party software?
 
WP-toolkit is unable to update WP-installations. The error is obviously due to user rights of the WP-toolkit compared to vhost user rights compared to file rights.

The error:
The WordPress plugins were updated with errors:
  • Installation "My CMS": Warning: Could not remove the old plugin. {"err_code":0,"err_message":"Updated 0\/1 plugins."}
Configuration:
- nginx and apache
- nginx processes php files via php-fpm

How do I set user rights or what has to be configured to have the WP-toolbox work again?

Martin, we'd like to help you out, but to do so, we need answers to the questions Igor has posted above. Thanks in advance!
 
Could you please show me permissions of directory plugins and subdirectories?

The directory permission rights are normally: "user name" : psacln
With these default user rights, Wordpress is unable to update plugins aka no file can be added or modified or deleted. (this happens as soon as I check "process php by nginx" in web hosting settings).

Once I change user rights to apache:apache, everything is cool. I can work normally inside wordpress. Yet any maintenance by Plesk Wordpress plugin is impossible (like update themes, plugins,...). Obviously since the Plesk Wordpress plugin relies on "user name" : psacln rights.

Could you please show me permissions of directory plugins and subdirectories?

Show you how? Its like written above +r +w for user, +r only for groups and everybody. chmod and chown I ofc applied recursively.

How these problem plugins have been installed?

Sorry, this doesnt really make a difference esspecially after I made sure, that the whole directory has identical user rights. chown -r respectively chmod -r.

Can you upgrade these plugins through WP admin panel?
Like I told above:
"user name" : psacln - works from inside Plesk, but not WP admin panel

apache:apache - works from inside WP admin panel, but not from inside Plesk

"user name" : psacln



Have you managed these WPs with help of any third-party software?

Seriously it doesnt matter as long as the plugin is copied there and has the same user rights as the whole WP installation.

bottom line: I have a user access rights problem, which obviously comes up, when php is managed by nginx.
 
Try to use "PHP as FastCGI" instead of "PHP as Apache module". It could be changed at Websites & Domains -> Hosting Settings button (for particular domain).
 
Due to the case, that by default the systemuser nginx is not in the usergroup psacln, you might consider the command, if you use FastCGI as well:

usermod -aG psacln nginx

Edit: Sorry misspelling... corrected my words.
 
Last edited by a moderator:
Since nginx is a system user (id < 500), editing /etc/group adds the user.

Apart from that, my issue persists.

Question/suggestion: How do I restore "normal user rights" and permissions inside httpdocs on each file?

Maybe somethign went wrong down that road?
 
Sorry... corrected my above post, due to misspelling.

You might as well, change your permissions to: www-data : psacln - ( or instead of www-data, please use the systemuser, which runs apache on YOUR system ), if you experience issues as described, because as far as I experience issues with the Wordpress Toolkit, it sometimes changes the permissions to systemuser_of_the_domain : psacln , depending on your specific domain cionfigurations.
 
Back
Top