How can I allow theme updates?

Hello,

I am using Wordpress with Avada theme installed. The theme require some patches but Hestia CP is blocking the updater.

I migrated the site to CPanel to confirm that, and the patches done without any errors.

The error log is below.
[Thu Jul 23 11:22:55.068032 2020] [core:crit] [pid 936162:tid 139959629510400] (13)Permission denied: [client 93.169.10.201:0] AH00529: /home/admin/web/XXX.com/public_html/wp-content/themes/Avada/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that ‘/home/admin/web/XXX.com/public_html/wp-content/themes/Avada/’ is executable, referer: https:XXX.com/wp-admin/admin.php?page=avada
2020/07/23 11:22:55 [crit] 936226#936226: *35085 open() “/home/admin/web/XXX.com/public_html/wp-content/themes/Avada/assets/admin/js/avada-admin.js” failed (13: Permission denied), client: 93.169.10.201, server: XXX.com, request: “GET /wp-content/themes/Avada/assets/admin/js/avada-admin.js?ver=7.0 HTTP/2.0”, host: “XXX.com”, referrer: “https:XXX.com/wp-admin/admin.php?page=avada”
[Thu Jul 23 11:22:55.223268 2020] [core:crit] [pid 936162:tid 139959604332288] (13)Permission denied: [client 93.169.10.201:0] AH00529: /home/admin/web/XXX.com/public_html/wp-content/themes/Avada/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that ‘/home/admin/web/XXX.com/public_html/wp-content/themes/Avada/’ is executable, referer: https:XXX.com/wp-admin/admin.php?page=avada

From the log its a Permission related.

How can I overcome this problem?

Thank you,
Nasser

seems like a permission issue. how did you deploy the wordpress and that theme?

can you please check the owner and permissions on that /home/admin/web/XXX.com/public_html/wp-content/themes/Avada/ folder?

Hello falzo,

The permission is set to 755…

I installed the wordpress via the Hestia CP installer. Then I used All-in-One Migration plugin to migrate my site from the old server.

I managed to apply the patches but I started to have another error when I tried to update a plugin related to the theme.

The error log shows the following
[Fri Jul 24 13:18:23.947801 2020] [proxy_fcgi:error] [pid 98697:tid 140635952641792] [client 93.168.211.126:0] AH01071: Got error ‘PHP message: PHP Warning: chmod(): Operation not permitted in /home/admin/web/XXX.com/public_html/wp-admin/includes/class-wp-filesystem-direct.php on line 168’, referer: https:XXX.com/wp-admin/admin.php?page=avada-plugins
[Fri Jul 24 13:23:23.815277 2020] [proxy_fcgi:error] [pid 98698:tid 140635910678272] [client 93.168.211.126:0] AH01071: Got error ‘PHP message: PHP Warning: chmod(): Operation not permitted in /home/admin/web/XXX.com/public_html/wp-admin/includes/class-wp-filesystem-direct.php on line 168’, referer: https:XXX.com/wp-admin/plugins.php?plugin_status=all&paged=1&s
[Fri Jul 24 13:50:50.468319 2020] [proxy_fcgi:error] [pid 98698:tid 140636030220032] [client 93.168.211.126:0] AH01071: Got error ‘PHP message: PHP Warning: chmod(): Operation not permitted in /home/admin/web/XXX.com/public_html/wp-admin/includes/class-wp-filesystem-direct.php on line 168’, referer: https:XXX.com/wp-admin/admin.php?page=avada-plugins&plugin_status=update

Please note that I am using PHP 7.2 with CPanel and 7.4 with Hestia.

Thank you for your support.

Check under what the backups is restored under it should be user:user

thanks for the update. I still think it is an permission/ownership issue. it could simply be that the migration plugin packs up all files on the source system keeping the pervious owners and permissions and unpacks them on the new system but does not or cannot adjust the ownership properly.

I have to admit that I am not familiar with these migration plugins, but I guess on top there are different plugins which do approach that in different ways anyway :wink:

on top beneath cpanel or any other hosting files and folders could belong to the webserver user (www-data), while on hestia this is always an inidvidual user instead. for php there also can be a difference in the way it’s integrated with the webserver and which functions are allowed to be run by the webserver and which are not.

so here is my suggestion on how to do such a migration:

  • first, please create a new user instead of using the admin account. as the admin itself is powerful and allowed to use sudo it is not advisable to use that account for hosting your live production stuff. if your wordpress get’s hacked it would be much more likely that an attacker can gain access to the full system and you for sure don’t want that :wink:
  • using the one click installer for deploying a wordpress should be fine, as well as using a third party plugin for the transfer of your theme, plugins and content.
  • after the initial migration but before updating, I’d recommend to reset the permissions via cli for all files (644) and folders (755) and make sure everything below public_html is owned by username:username (I recommend using find -exec rather than just recursive chmod/chown to not mess up even more ;-))

start the updates only after that and I am quite sure that the problems should be gone…

4 Likes

Falzo

Thank you for your support.

Its was a permission related problem as you said and I managed to fix it with your help.

I also migrated the site from admin to user account as you recommended.

Should I delete the wordpress files and datebase from the admin account and make the public_html directory empty?

Thanks again for the support.