E-mail notification not activated - no cron background process started - solved!

#1

Hi,
I’m a newbie in NC .
I have newly setup NC (via web installer at public webhosting provider (cpanel / MySQL / FTP) ).

One of the hottest topic I need is e-mail notification on file modifications.
However that is the only thing not working.

For reproducing the error I have deleted a file in a shared folder and I have got no email notification.
(I have checked all Mail notification checkbox and even I have set the checkbox “Notify about your own actions via email”)

Background job setting: Cron

E-mail sending - test email works

My scenario:

Nextcloud version 15.0.7
PHP version PHP 7.2 (ea-php72)

Config.php:

<?php
$CONFIG = array (
  'instanceid' => '....',
  'passwordsalt' => '....',
  'secret' => '....',
  'trusted_domains' => 
  array (
    0 => '....',
  ),
  'datadirectory' => '/home/..../nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '15.0.7.0',
  'overwrite.cli.url' => '....',
  'dbname' => '....',
  'dbhost' => 'localhost:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '...',
  'dbpassword' => '...',
  'installed' => true,
  'mail_from_address' => 'nextcloud',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => '....',
  'mail_smtphost' => 'localhost',
  'mail_smtpport' => '25',
  'updater.secret' => '$...a',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 0,
  'integrity.check.disabled' => true,
  'logtimezone' => 'Europe/Budapest',
); 

The output of your Nextcloud log

{"reqId":"XMIBMLDSUe@gd-OS@0P4nQAAAA4","level":0,"time":"2019-04-25T20:49:21+02:00","remoteAddr":"80.98.220.140","user":"admin","app":"no app in context","method":"DELETE","url":"\/remote.php\/dav\/files\/admin\/Kozos\/e-papir.pptx","message":"No cache entry found for \/admin\/files\/Kozos\/e-papir.pptx (storage: shared::\/Kozos, internalPath: e-papir.pptx)","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/73.0.3683.103 Safari\/537.36","version":"15.0.7.0"}  

It can bee seen in the log that no cron job has been initiated.

What did I do wrong?

Peter

#2

Some additional info:
Now I can see in Settings / Background job:

idézetblokk

Last job execution ran 13 hours ago. Something seems wrong.

idézetblokk

Setting is Cron
At Cron settings I can read:

idézetblokk

Use system cron service to call the cron.php file every 15 minutes. The cron.php needs to be executed by the system user “arconsul”

idézetblokk

May be that is the problem.
But user arconsul is the cpanel user.
Where can I set cron.php to be started as user arconsul?

Any help appreciated

#3

Found the solution! Now it’s working!
I have found in the manual:

Blockquote

To run a cron job on a *nix system, every 15 minutes, under the default Web server user (often, www-data or wwwrun ), you must set up the following cron job to call the cron.php script:

crontab -u www-data -e */15 * * * * php -f /var/www/nextcloud/cron.php

Blockquote

May be i would be a good idea to put this info to the settings page as well.