Nextcloud version: 29.0.5
Operating system and version : Ubuntu Server 22.04 LTS
Apache or nginx version: Apache 2.4.52
PHP version : 8.1
Got the warning: " Some jobs have not been executed since 7 dage siden. Please consider increasing the execution frequency. "
Which was surprising, because cronjobs have been running smoothly up until now.
I suspect the issue began with this: Some days ago I got an error message about not being able to write to config.
I read:
https://docs.nextcloud.com/server/stable/admin_manual/maintenance/manual_upgrade.html
and solved it thus:
cd /var/www; $ sudo chown -R www-data:www-data nextcloud
However, I missed that config.php is now owned by www-data. This is confirmed in Basic Settings:
Image description: “The cron.php needs to be executed by the system account www-data”.
I’m positive that cronjobs used to be executed by root. The cron.php job is even in the root crontab.
I removed the job from root and added it to www-data:
sudo crontab -u www-data -l
*/5 * * * * /usr/bin/php8.1 --define apc.enable_cli=1 -f /var/www/nextcloud/cron.php
No change. The warning persists.
Running the job from the command line returned no errors, but also didn’t remove the warning.
Changing ownership of the config folder back to root would probably not work?
Not sure how to proceed. Any help is appreciated.
Is this the first time you’ve seen this error? Yes.
Admin > Logging:
{"reqId":"8PVprTBIYMKMGLxF1deZ","level":3,"time":"2024-08-27T19:15:44+00:00","remoteAddr":"xx.xx.xx.xx","user":"--","app":"PHP","method":"GET","url":"/settings/admin","message":"fopen(/var/www/nextcloud/config/config.php): Failed to open stream: Permission denied at /var/www/nextcloud/lib/private/Config.php#221","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:129.0) Gecko/20100101 Firefox/129.0","version":"","data":{"app":"PHP"}}
{"reqId":"3NwPntpxAoE6Xc28nTaB","level":3,"time":"2024-08-27T19:15:45+00:00","remoteAddr":"xx.xx.xx.xx","user":"--","app":"PHP","method":"GET","url":"/index.php/apps/files/preview-service-worker.js","message":"fopen(/var/www/nextcloud/config/config.php): Failed to open stream: Permission denied at /var/www/nextcloud/lib/private/Config.php#221","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:129.0) Gecko/20100101 Firefox/129.0","version":"","data":{"app":"PHP"}}
{"reqId":"7K7aqhmR88NxlUvk1BIM","level":3,"time":"2024-08-27T19:15:49+00:00","remoteAddr":"xx.xx.xx.xx","user":"--","app":"PHP","method":"GET","url":"/settings/admin","message":"fopen(/var/www/nextcloud/config/config.php): Failed to open stream: Permission denied at /var/www/nextcloud/lib/private/Config.php#221","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:129.0) Gecko/20100101 Firefox/129.0","version":"","data":{"app":"PHP"}}
{"reqId":"f4oNmc6JdYMIHTPFOrUM","level":3,"time":"2024-08-27T19:15:50+00:00","remoteAddr":"xx.xx.xx.xx","user":"--","app":"PHP","method":"GET","url":"/index.php/apps/files/preview-service-worker.js","message":"fopen(/var/www/nextcloud/config/config.php): Failed to open stream: Permission denied at /var/www/nextcloud/lib/private/Config.php#221","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:129.0) Gecko/20100101 Firefox/129.0","version":"","data":{"app":"PHP"}}
{"reqId":"uo30vXUuKuD7Rng058ZJ","level":3,"time":"2024-08-27T19:15:58+00:00","remoteAddr":"xx.xx.xx.xx","user":"--","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/files/something/something","message":"Error: Class \"OCA\\DAV\\Connector\\Sabre\\ExceptionLoggerPlugin\" not found at /var/www/nextcloud/remote.php#62","userAgent":"Mozilla/5.0 (Linux) mirall/3.13.2git (Nextcloud, fedora-6.10.6-200.fc40.x86_64 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"","data":{"app":"PHP"}}
{"reqId":"uo30vXUuKuD7Rng058ZJ","level":3,"time":"2024-08-27T19:15:58+00:00","remoteAddr":"xx.xx.xx.xx","user":"--","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/files/something/something","message":"fopen(/var/www/nextcloud/config/config.php): Failed to open stream: Permission denied at /var/www/nextcloud/lib/private/Config.php#221","userAgent":"Mozilla/5.0 (Linux) mirall/3.13.2git (Nextcloud, fedora-6.10.6-200.fc40.x86_64 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"","data":{"app":"PHP"}}
{"reqId":"rPcz698WlSBQL5dEUPOg","level":3,"time":"2024-08-27T19:15:58+00:00","remoteAddr":"xx.xx.xx.xx","user":"--","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/files/something/something","message":"Error: Class \"OCA\\DAV\\Connector\\Sabre\\ExceptionLoggerPlugin\" not found at /var/www/nextcloud/remote.php#62","userAgent":"Mozilla/5.0 (Linux) mirall/3.13.2git (Nextcloud, fedora-6.10.6-200.fc40.x86_64 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"","data":{"app":"PHP"}}
{"reqId":"rPcz698WlSBQL5dEUPOg","level":3,"time":"2024-08-27T19:15:58+00:00","remoteAddr":"xx.xx.xx.xx","user":"--","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/files/something/something","message":"fopen(/var/www/nextcloud/config/config.php): Failed to open stream: Permission denied at /var/www/nextcloud/lib/private/Config.php#221","userAgent":"Mozilla/5.0 (Linux) mirall/3.13.2git (Nextcloud, fedora-6.10.6-200.fc40.x86_64 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"","data":{"app":"PHP"}}
{"reqId":"wAOaOnn2MdK1VJomWsXq","level":3,"time":"2024-08-27T19:15:58+00:00","remoteAddr":"xx.xx.xx.xx","user":"--","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/files/something/Dokumenter","message":"Error: Class \"OCA\\DAV\\Connector\\Sabre\\ExceptionLoggerPlugin\" not found at /var/www/nextcloud/remote.php#62","userAgent":"Mozilla/5.0 (Linux) mirall/3.13.2git (Nextcloud, fedora-6.10.6-200.fc40.x86_64 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"","data":{"app":"PHP"}}
{"reqId":"wAOaOnn2MdK1VJomWsXq","level":3,"time":"2024-08-27T19:15:58+00:00","remoteAddr":"xx.xx.xx.xx","user":"--","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/files/something/Dokumenter","message":"fopen(/var/www/nextcloud/config/config.php): Failed to open stream: Permission denied at /var/www/nextcloud/lib/private/Config.php#221","userAgent":"Mozilla/5.0 (Linux) mirall/3.13.2git (Nextcloud, fedora-6.10.6-200.fc40.x86_64 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"","data":{"app":"PHP"}}
cat /var/logs/syslog:
Aug 27 19:20:01 nextcloud CRON[119965]: (www-data) CMD (/usr/bin/php8.1 --define apc.enable_cli=1 -f /var/www/nextcloud/cron.php)
Aug 27 19:20:03 nextcloud CRON[119963]: (CRON) info (No MTA installed, discarding output)
Aug 27 19:20:29 nextcloud crontab[119971]: (root) LIST (www-data)
Looks normal?
Earlier in the log, I see that cron.php used to be executed by root:
Aug 27 17:40:01 nextcloud CRON[100621]: (root) CMD (/usr/bin/php8.1 --define apc.enable_cli=1 -f /var/www/nextcloud/cron.php)
Aug 27 17:40:01 nextcloud CRON[100619]: (CRON) info (No MTA installed, discarding output)
Aug 27 17:40:03 nextcloud CRON[100618]: (CRON) info (No MTA installed, discarding output)