cancel
Showing results for 
Search instead for 
Did you mean: 

persistent magento cron - /bin/sh: 1: /usr/bin/php8.1: Permission denied

persistent magento cron - /bin/sh: 1: /usr/bin/php8.1: Permission denied

Magento 2.4.5 Plesk obsidian

when running the cron job in plesk it runs fine without errors, however do not update the logs in /var/logs in magento.

manually running the cron job via ssh is fine /opt/plesk/php/8.1/bin/php -dmemory_limit=-1 bin/magento cron:run

installed cron manager only error that comes up is for sales order invoices etc..: Deprecated Functionality: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /public_html/vendor/magento/zendframework1/library/Zend/Log/Formatter/Simple.php on line 103

however, the cron job is not running on schedule and the /bin/sh: 1: /usr/bin/php8.1: Permission denied, is persistent.

i have fixed permissions running the usual commands: sudo find var/ generated/ vendor/ pub/static/ pub/media/ app/etc/ -type f -exec chmod g+w {} ;

sudo find var/ generated/ vendor/ pub/static/ pub/media/ app/etc/ -type d -exec chmod g+ws {} ;

sudo chown -R _user:www-data .

any advice will be appreciated