0

I really hope someone can help. As my name suggests I am a noob to Magento. I installed Magento a few months ago and have been going through training and learning sites to find my feet. Yesterday, an update was released (v2.3.1). I have tried to update it via the SYSTEM UPGRADE option. At first, I had errors that the cron was not set up or configured correctly - to fix this I did the following:

  • Putty into server
  • log in as owner
  • changed to root
  • ran the command (water is the owner)
  • inserted the following lines
          • /usr/local/bin/php /public_html/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /public_html/var/log/magento.cron.log
            • /usr/local/bin/php /public_html/update/cron.php >> /public_html/var/log/update.cron.log
            • /usr/local/bin/php /public_html/bin/magento setup:cron:run >> /public_html/var/log/setup.cron.log
  • exited the editor
  • crontab -u water -l
  • bin/magento cron:run

This gave the output of

Ran jobs by schedule

However, the readiness check still gave the error that the cron was incorrectly configured. I tried to restart the cron service but it did not help.

I then decided to try the following: - bin/magento cron:remove - php bin/magento cron:install (without the [--force])

This change the cron to the following:

> #~ MAGENTO START d548577901e562a035b1312551f1a47d SHELL="/bin/bash"
>     * /opt/cpanel/ea-php72/root/usr/bin/php /home/water/public_html/bin/magento cron:run 2>&1 | grep -v "Ran jobs
> by schedule" >> /home/water/public_html/var/log/magento.cron.log
> 
> SHELL="/bin/bash"
>     * /opt/cpanel/ea-php72/root/usr/bin/php /home/water/public_html/update/cron.php >>
> /home/water/public_html/var/log/update.cron.log
> 
> SHELL="/bin/bash"
>     * /opt/cpanel/ea-php72/root/usr/bin/php /home/water/public_html/bin/magento setup:cron:run >>
> /home/water/public_html/var/log/setup.cron.log

-bin/magento cron:run

Everything seems to be working as the logs were being generated.

I tried the readiness check again - success the cron was working. BUT, how the error is

Found non-writable path(s): /home/water/public_html/.user.ini (this file I can't find on the system) /home/water/public_html/generated/code/* (there are a whole bunch of folders and files) /home/water/public_html/var/.htaccess (this file I can't find on the system).

The permissions are set to 0644 for files and 0775 for folders.

Any ideas on how I go about fixing this?

Thanks

  • Update: I noticed that the owners of the files and folders were not correct. I corrected these by running a chown on the entire home/water/public_html/. I then made sure permissions were set correctly using the follow command cd /home/water/public_html/ && find var generated vendor pub/static pub/media app/etc -type f -exec chmod u+w {} + && find var generated vendor pub/static pub/media app/etc -type d -exec chmod u+w {} + && chmod u+x bin/magento – newbie_rebel Mar 30 at 15:36
  • New problem: after the update Problem is now showing Found non-writable path(s): /home/water/public_html/.user.ini /home/water/public_html/var/.htaccess Problem is that these files do no exist in those folders. – newbie_rebel Mar 30 at 15:38
  • replaced files from magento.zip. – newbie_rebel Mar 31 at 9:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.