danb35 / freenas-iocage-nextcloud

Script to create an iocage jail on FreeNAS for the latest Nextcloud 28 release, including Caddy, MariaDB or PostgreSQL, and Let's Encrypt
GNU General Public License v3.0
258 stars 70 forks source link

crontab issue on new installation #192

Open arthertm opened 2 years ago

arthertm commented 2 years ago

Dan,

Thanks for resolving previious issue. Moved to a new server and undertook a fresh install. On several attempts all goes ok, but each time greeted with a crontab issue: -

crontab: /mnt/includes/www-crontab: Permission denied Command: crontab /mnt/includes/www-crontab failed!

Which then in the system overview the follow issues display (I think the first one only related to the crontab and failure to run background task):

Its primarily the background task issue I'm seeking resolution/advise.

Thanks

danb35 commented 2 years ago

crontab: /mnt/includes/www-crontab: Permission denied

This error is the reason for this:

Last background job execution ran 3 days ago.

...but it's not something I remember seeing, or can think why it would. Let's see if we can get that cron job created.

Inside the jail, create a text file called cronjob. Its contents should be:

*/5 * * * * /usr/local/bin/php -f /usr/local/www/nextcloud/cron.php

Then run crontab -u www cronjob. Does that run without errors?

arthertm commented 2 years ago

Thanks Dan

Created cronjob textfile inside jail, contents as you stated, Ran using he command and runs with no errors.

The error remains in Nextcloud

Last background job execution ran 5 days ago. Something seems wrong. Check the background job settings ↗.

I'm probably adding no value here - but just checked the ownership of mnt/includes from the install error - its an empty folder and permissions are root:wheel