Skip to content

[Bug]: admin/overview "Security & setup warnings" doesn't work when nextcloud.log file doesn't exist #43956

@StCyr

Description

@StCyr

⚠️ This issue respects the following points: ⚠️

Bug description

I've just upgraded to 28.0.3 and find my admin/overview "Security & setup warnings" page not working.

looking at the log I find the following line:

2024-03-02T12:52:56.584946+00:00 ***** Nextcloud[4168063]: {"reqId":"tcWVwfib3YMWCFR81P9u","level":3,"time":"2024-03-02T12:52:56+00:00","remoteAddr":"94.110.24.2","user":"admin","app":"index","method":"GET","url":"/index.php/settings/ajax/checksetup","message":"{\"Exception\":\"Exception\",\"Message\":\"Error while opening /var/www/nextcloud/data/nextcloud.log\",\"Code\":0,\"Trace\":[{\"file\":\"/var/www/nextcloud/apps/logreader/lib/SetupChecks/LogErrors.php\",\"line\":57,\"function\":\"getLogIterator\",\"class\":\"OCA\\\\LogReader\\\\Log\\\\LogIteratorFactory\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/SetupCheck/SetupCheckManager.php\",\"line\":49,\"function\":\"run\",\"class\":\"OCA\\\\LogReader\\\\SetupChecks\\\\LogErrors\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/apps/settings/lib/Controller/CheckSetupController.php\",\"line\":303,\"function\":\"runAll\",\"class\":\"OC\\\\SetupCheck\\\\SetupCheckManager\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php\",\"line\":230,\"function\":\"check\",\"class\":\"OCA\\\\Settings\\\\Controller\\\\CheckSetupController\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php\",\"line\":137,\"function\":\"executeController\",\"class\":\"OC\\\\AppFramework\\\\Http\\\\Dispatcher\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/AppFramework/App.php\",\"line\":184,\"function\":\"dispatch\",\"class\":\"OC\\\\AppFramework\\\\Http\\\\Dispatcher\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/Route/Router.php\",\"line\":315,\"function\":\"main\",\"class\":\"OC\\\\AppFramework\\\\App\",\"type\":\"::\"},{\"file\":\"/var/www/nextcloud/lib/base.php\",\"line\":1069,\"function\":\"match\",\"class\":\"OC\\\\Route\\\\Router\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/index.php\",\"line\":39,\"function\":\"handleRequest\",\"class\":\"OC\",\"type\":\"::\"}],\"File\":\"/var/www/nextcloud/apps/logreader/lib/Log/LogIteratorFactory.php\",\"Line\":56,\"message\":\"Error while opening /var/www/nextcloud/data/nextcloud.log\",\"exception\":{},\"CustomMessage\":\"Error while opening /var/www/nextcloud/data/nextcloud.log\"}","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0","version":"28.0.3.2"}

Indeed, I've deleted the /var/www/nextcloud/data/nextcloud.log since I'm using syslog logging.

Recreating an empty nextcloud.log file solved the issue but the admin/overview should handle this case better (ie: do not fail when using syslog and no nextcloud.log file exist)

Steps to reproduce

  1. have 28.0.3 installed
  2. have following config:
    'log_type' => 'syslog',
    'logfile' => '',
    'loglevel' => 0,
  3. delete file nextcloud.log
  4. open the admin/overview page

Expected behavior

the admin/overview page "Security & setup warnings" shouldn't show an error

Installation method

Community Manual installation with Archive

Nextcloud Server version

28

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.2

Web server

Apache (supported)

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Upgraded to a MAJOR version (ex. 22 to 23)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "nextcloud.bollu.be"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "default_phone_region": "BE",
        "version": "28.0.3.2",
        "debug": false,
        "log_type": "syslog",
        "logfile": "",
        "loglevel": 0,
        "overwrite.cli.url": "https:\/\/nextcloud.bollu.be",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "mail_smtpmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "updater.release.channel": "stable",
        "theme": "",
        "mail_sendmailmode": "smtp",
        "app_install_overwrite": [
            "calendar",
            "issuetemplate",
            "spreed",
            "social",
            "contacts",
            "files_markdown",
            "files_texteditor",
            "polls",
            "cms_pico"
        ],
        "updater.secret": "***REMOVED SENSITIVE VALUE***"
    }
}

List of activated Apps

Enabled:
  - activity: 2.20.0
  - admin_audit: 1.18.0
  - calendar: 4.6.5
  - circles: 28.0.0-dev
  - cloud_federation_api: 1.11.0
  - cms_pico: 1.0.21
  - comments: 1.18.0
  - contacts: 5.5.2
  - contactsinteraction: 1.9.0
  - dashboard: 7.8.0
  - dav: 1.29.1
  - deck: 1.12.2
  - federatedfilesharing: 1.18.0
  - federation: 1.18.0
  - files: 2.0.0
  - files_automatedtagging: 1.18.0
  - files_pdfviewer: 2.9.0
  - files_reminders: 1.1.0
  - files_retention: 1.17.1
  - files_sharing: 1.20.0
  - files_trashbin: 1.18.0
  - files_versions: 1.21.0
  - firstrunwizard: 2.17.0
  - logreader: 2.13.0
  - lookup_server_connector: 1.16.0
  - nextcloud_announcements: 1.17.0
  - notifications: 2.16.0
  - oauth2: 1.16.3
  - password_policy: 1.18.0
  - photos: 2.4.0
  - privacy: 1.12.0
  - provisioning_api: 1.18.0
  - recommendations: 2.0.0
  - related_resources: 1.3.0
  - serverinfo: 1.18.0
  - settings: 1.10.1
  - sharebymail: 1.18.0
  - spreed: 18.0.4
  - support: 1.11.0
  - systemtags: 1.18.0
  - text: 3.9.1
  - theming: 2.3.0
  - twofactor_backupcodes: 1.17.0
  - updatenotification: 1.18.0
  - user_status: 1.8.1
  - viewer: 2.2.0
  - weather_status: 1.8.0
  - workflowengine: 2.10.0
Disabled:
  - bruteforcesettings: 2.8.0
  - encryption: 2.16.0
  - files_external: 1.20.0
  - sendent: 2.0.0 (installed 2.0.0)
  - survey_client: 1.16.0 (installed 1.2.0)
  - suspicious_login: 6.0.0
  - theming_customcss: 1.15.0 (installed 1.15.0)
  - twofactor_totp: 10.0.0-beta.2
  - user_ldap: 1.19.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

No response

Additional info

No response

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions