Web ui broken after upgrade from 28.0.4 to 28.0.8

Nextcloud version : 28.0.4
Operating system and version : shouldn’t matter - docker
Apache or nginx version : nginx 1.15.2

The issue you are facing:
After upgrading from 28.0.4 to 28.0.8, the web ui seems broken. I cannot log in anymore, the CSS seems also to be missing.
The only thing I see in the browser is :

Nextcloud

Nextcloud – a safe home for all your data

(Other sync client (kde) looks ok.)

Is this the first time you’ve seen this error? Y

I spot following lines from docker-compose logs nextcloud_app

nextcloud_app_1  | Update successful
nextcloud_app_1  | Turned off maintenance mode
nextcloud_app_1  | Resetting log level
nextcloud_app_1  | The following apps have been disabled:
nextcloud_app_1  | => Searching for scripts (*.sh) to run, located in the folder: /docker-entrypoint-hooks.d/post-upgrade
nextcloud_app_1  | Initializing finished
nextcloud_app_1  | Warning: /var/www/html/config/apps.config.php differs from the latest version of this image at /usr/src/nextcloud/config/apps.config.php
nextcloud_app_1  | Warning: /var/www/html/config/autoconfig.php differs from the latest version of this image at /usr/src/nextcloud/config/autoconfig.php
nextcloud_app_1  | Warning: /var/www/html/config/redis.config.php differs from the latest version of this image at /usr/src/nextcloud/config/redis.config.php
nextcloud_app_1  | Warning: /var/www/html/config/reverse-proxy.config.php differs from the latest version of this image at /usr/src/nextcloud/config/reverse-proxy.config.php
nextcloud_app_1  | Warning: /var/www/html/config/s3.config.php differs from the latest version of this image at /usr/src/nextcloud/config/s3.config.php
nextcloud_app_1  | Warning: /var/www/html/config/smtp.config.php differs from the latest version of this image at /usr/src/nextcloud/config/smtp.config.php
nextcloud_app_1  | Warning: /var/www/html/config/swift.config.php differs from the latest version of this image at /usr/src/nextcloud/config/swift.config.php
nextcloud_app_1  | Warning: /var/www/html/config/upgrade-disable-web.config.php differs from the latest version of this image at /usr/src/nextcloud/config/upgrade-disable-web.config.php
nextcloud_app_1  | => Searching for scripts (*.sh) to run, located in the folder: /docker-entrypoint-hooks.d/before-starting

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

{"reqId":"ZqgfEQelh6ELPvcm4fSG","level":3,"time":"2024-07-23T14:50:47+00:00","remoteAddr":"192.168.1.92","user":"--","app":"index","method":"GET","url":"/nextcloud/index.phping/favicon?v=b6589fc6","message":"Exception thrown: OCP\\Files\\GenericFileException","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0","version":"28.0.8.1","exception":{"Exception":"OCP\\Files\\GenericFileException","Message":"","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Files/SimpleFS/SimpleFile.php","line":74,"function":"getContent","class":"OC\\Files\\Node\\File","type":"->","args":[]},{"file":"/var/www/html/lib/public/AppFramework/Http/FileDisplayResponse.php","line":70,"function":"getContent","class":"OC\\Files\\SimpleFS\\SimpleFile","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":241,"function":"callback","class":"OCP\\AppFramework\\Http\\FileDisplayResponse","type":"->","args":[["OC\\AppFramework\\Http\\Output"]]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Theming\\Controller\\IconController","getFavicon",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["core","theming.Icon.getFavicon"]]},{"file":"/var/www/html/lib/base.php","line":1069,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/theming/favicon"]},{"file":"/var/www/html/index.php","line":39,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/Files/Node/File.php","Line":56,"message":"","exception":{},"CustomMessage":"Exception thrown: OCP\\Files\\GenericFileException"}}
{"reqId":"6fsT0bOBstnLyEs8P313","level":3,"time":"2024-07-23T14:50:47+00:00","remoteAddr":"192.168.1.92","user":"--","app":"index","method":"GET","url":"/nextcloud/index.phping/icon?v=b6589fc6","message":"Exception thrown: OCP\\Files\\GenericFileException","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0","version":"28.0.8.1","exception":{"Exception":"OCP\\Files\\GenericFileException","Message":"","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Files/SimpleFS/SimpleFile.php","line":74,"function":"getContent","class":"OC\\Files\\Node\\File","type":"->","args":[]},{"file":"/var/www/html/lib/public/AppFramework/Http/FileDisplayResponse.php","line":70,"function":"getContent","class":"OC\\Files\\SimpleFS\\SimpleFile","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":241,"function":"callback","class":"OCP\\AppFramework\\Http\\FileDisplayResponse","type":"->","args":[["OC\\AppFramework\\Http\\Output"]]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Theming\\Controller\\IconController","getTouchIcon",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["core","theming.Icon.getTouchIcon"]]},{"file":"/var/www/html/lib/base.php","line":1069,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/theming/icon"]},{"file":"/var/www/html/index.php","line":39,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/Files/Node/File.php","Line":56,"message":"","exception":{},"CustomMessage":"Exception thrown: OCP\\Files\\GenericFileException"}}

Based on your log entries you appear to have Nextcloud in a subfolder.

Can you post your Compose file and elaborate on your setup? Perhaps post the output of occ config:list system from inside your container as well.

The warnings from your container log are due to this: GitHub - nextcloud/docker: ⛴ Docker image of Nextcloud

That’s interesting.
The content of the apps.config.php files are identical, except that in /var/www/html/config, strings are enclosed by double quotes and in /usr/src/nextcloud/config, strings are enclosed by single quotes.
All the other files for which a warning is generated are simply not present in /var/www/html/config.

Shall I manually copy these files to /var/www/html/config and overwrite apps.config.php ?

I just did that and it didn’t solve the issue.
The docker-compose logs now tells me :


nextcloud_app_1  | => Searching for scripts (*.sh) to run, located in the folder: /docker-entrypoint-hooks.d/before-starting
nextcloud_app_1  | [23-Jul-2024 16:28:23] NOTICE: fpm is running, pid 1
nextcloud_app_1  | [23-Jul-2024 16:28:23] NOTICE: ready to handle connections
nextcloud_app_1  | 172.21.0.8 -  23/Jul/2024:16:29:02 +0000 "GET /index.php" 200
nextcloud_app_1  | 172.21.0.8 -  23/Jul/2024:16:29:06 +0000 "GET /index.php" 500
nextcloud_app_1  | 172.21.0.8 -  23/Jul/2024:16:29:06 +0000 "GET /index.php" 500

I guess the two 500 errors are related to the exception in the log file.

I wasn’t suggesting those are related to whatever your main issue is. But they are a good problem to address since those config files being out of spec will break documented behavior for the Docker image. So glad that’s addressed. :slight_smile:

Did you have a response to the main part of my response to your post:

Based on your log entries you appear to have Nextcloud in a subfolder. Can you post your Compose file and elaborate on your setup? Perhaps post the output of occ config:list system from inside your container as well.

Based on the original log entries there are multiple possibilities, including your web server config.

1 Like

Oh, I see … just noticed I have 403 errors for some (but not all) css and js.

That’s weird because my nextcloud is running behind a reverse-proxy that handles https.

See my docker-compose here :

version: '3'

services:
  nextcloud_db:
    image: mariadb:10.3.8
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    restart: always
    volumes:
      - nextcloud_db:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=****
      - MYSQL_PASSWORD=****
      - MYSQL_DATABASE=****
      - MYSQL_USER=****

  nextcloud_app:  
    image: nextcloud:28.0.8-fpm-alpine
    restart: always
    volumes:
      - nextcloud_app:/var/www/html
    environment:
      - MYSQL_PASSWORD=****
      - MYSQL_DATABASE=****
      - MYSQL_USER=****
      - MYSQL_HOST=****
      - NEXTCLOUD_ADMIN_USER=****
      - NEXTCLOUD_ADMIN_PASSWORD=****
    depends_on:
      - nextcloud_db

  nextcloud_web:
    image: nginx:1.15.2-alpine
    restart: always
    volumes:
      - ./nginx_nextcloud.conf:/etc/nginx/nginx.conf:ro
      - nextcloud_app:/var/www/html:ro
    depends_on:
      - nextcloud_app

  web:
    image: nginx:1.15.2-alpine
    restart: always
    volumes:
      - ./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
      - ./nginx/htpasswd:/etc/nginx/htpasswd:ro
      - ./html:/var/www/html:ro
      - letsencrypt:/letsencrypt:ro
    depends_on:
      - nextcloud_web
    ports:
      - 80:80
      - 443:443

  certbot:
    build: ./certbot
    restart: always
    volumes:
      - letsencrypt:/etc/letsencrypt
      - ./html:/html

volumes:
  letsencrypt:
    driver_opts:
      type: none
      device: /mnt/disk/mycloud/letsencrypt
      o: bind
  nextcloud_db:
    driver_opts:
      type: none
      device: /mnt/disk/mycloud/nextcloud_db
      o: bind
  nextcloud_app:
    driver_opts:
      type: none
      device: /mnt/disk/mycloud/nextcloud_app
      o: bind

Also adding the output of occ config:list as requested

{
    "system": {
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "my_domain_name"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "28.0.8.1",
        "overwrite.cli.url": "http:\/\/my_domain_name",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "overwritewebroot": "\/nextcloud",
        "overwritehost": "my_domain_name",
        "overwriteprotocol": "https",
        "loglevel": 0,
        "maintenance": false,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_smtpauthtype": "LOGIN",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpsecure": "tls",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "theme": "",
        "app_install_overwrite": [
            "news",
            "files_markdown",
            "mindmap_app"
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "upgrade.disable-web": true
    },
    "apps": {
        "activity": {
            "enabled": "yes",
            "installed_version": "2.20.0",
            "types": "filesystem"
        },
        "backgroundjob": {
            "lastjob": "27320"
        },
        "bookmarks": {
            "enabled": "yes",
            "installed_version": "14.2.2",
            "performance.maxBookmarksperAccount": "",
            "previews.pageres.env": "",
            "previews.screenly.token": "",
            "previews.screenly.url": "",
            "previews.screenshotmachine.key": "",
            "previews.webshot.url": "",
            "privacy.enableScraping": "true",
            "types": ""
        },
        "calendar": {
            "enabled": "yes",
            "installed_version": "4.7.12",
            "types": ""
        },
        "circles": {
            "enabled": "yes",
            "installed_version": "28.0.0",
            "loopback_tmp_scheme": "http",
            "maintenance_run": "0",
            "maintenance_update": "{\"3\":1721798705,\"2\":1721800206,\"1\":1721800505}",
            "migration_22": "1",
            "migration_run": "0",
            "types": "filesystem,dav"
        },
        "cloud_federation_api": {
            "enabled": "yes",
            "installed_version": "1.11.0",
            "types": "filesystem"
        },
        "comments": {
            "enabled": "yes",
            "installed_version": "1.18.0",
            "types": "logging"
        },
        "contacts": {
            "enabled": "yes",
            "installed_version": "5.5.3",
            "types": "dav"
        },
        "contactsinteraction": {
            "enabled": "yes",
            "installed_version": "1.9.0",
            "types": "dav"
        },
        "core": {
            "backgroundjobs_mode": "cron",
            "enterpriseLogoChecked": "yes",
            "files_metadata": "{\"photos-original_date_time\":{\"value\":null,\"type\":\"int\",\"indexed\":true,\"editPermission\":0},\"photos-exif\":{\"value\":null,\"type\":\"array\",\"indexed\":false,\"editPermission\":0},\"photos-ifd0\":{\"value\":null,\"type\":\"array\",\"indexed\":false,\"editPermission\":0},\"photos-size\":{\"value\":null,\"type\":\"array\",\"indexed\":false,\"editPermission\":0},\"photos-gps\":{\"value\":null,\"type\":\"array\",\"indexed\":false,\"editPermission\":0},\"photos-place\":{\"value\":null,\"type\":\"string\",\"indexed\":true,\"editPermission\":0}}",
            "files_metadata_installed": "1",
            "installedat": "1537992532.7577",
            "lastcron": "1721800506",
            "lastupdateResult": "{\"version\":\"29.0.4.1\",\"versionstring\":\"Nextcloud 29.0.4\",\"url\":\"https:\\\/\\\/download.nextcloud.com\\\/server\\\/releases\\\/nextcloud-29.0.4.zip\",\"web\":\"https:\\\/\\\/docs.nextcloud.com\\\/server\\\/29\\\/admin_manual\\\/maintenance\\\/upgrade.html\",\"changes\":\"https:\\\/\\\/updates.nextcloud.com\\\/changelog_server\\\/?version=29.0.4\",\"autoupdater\":\"1\",\"eol\":\"0\"}",
            "lastupdatedat": "1721752637",
            "metadataGenerationLastHandledUser": "ben",
            "moveavatarsdone": "yes",
            "oc.integritycheck.checker": "[]",
            "previewsCleanedUp": "1",
            "public_files": "files_sharing\/public.php",
            "public_webdav": "dav\/appinfo\/v1\/publicwebdav.php",
            "scss.variables": "08343dd3f787291558383b46e1b489fb",
            "shareapi_allow_resharing": "no",
            "shareapi_default_expire_date": "yes",
            "shareapi_default_permission_cancreate": "no",
            "shareapi_default_permission_candelete": "no",
            "shareapi_default_permission_canshare": "no",
            "shareapi_default_permission_canupdate": "no",
            "shareapi_default_permissions": "1",
            "shareapi_enable_link_password_by_default": "yes",
            "shareapi_enforce_expire_date": "no",
            "shareapi_enforce_links_password": "yes",
            "theming.variables": "32ef7dc01a3ffbcbbaf8fb9483f9bd03",
            "vendor": "nextcloud"
        },
        "dashboard": {
            "enabled": "yes",
            "installed_version": "7.8.0",
            "types": ""
        },
        "dav": {
            "buildCalendarReminderIndex": "yes",
            "buildCalendarSearchIndex": "yes",
            "chunks_migrated": "1",
            "enabled": "yes",
            "installed_version": "1.29.2",
            "needs_system_address_book_sync": "no",
            "regeneratedBirthdayCalendarsForYearFix": "yes",
            "types": "filesystem"
        },
        "deck": {
            "enabled": "no",
            "installed_version": "1.12.2",
            "types": "dav"
        },
        "end_to_end_encryption": {
            "enabled": "no",
            "installed_version": "1.12.5",
            "types": "filesystem,dav"
        },
        "federatedfilesharing": {
            "enabled": "yes",
            "installed_version": "1.18.0",
            "types": ""
        },
        "federation": {
            "enabled": "yes",
            "installed_version": "1.18.0",
            "types": "authentication"
        },
        "files": {
            "cronjob_scan_files": "500",
            "enabled": "yes",
            "installed_version": "2.0.0",
            "mimetype_version": "28.0.4.1",
            "types": "filesystem"
        },
        "files_mindmap": {
            "enabled": "no",
            "installed_version": "0.0.30",
            "types": ""
        },
        "files_pdfviewer": {
            "enabled": "yes",
            "installed_version": "2.9.0",
            "types": ""
        },
        "files_reminders": {
            "enabled": "yes",
            "installed_version": "1.1.0",
            "types": "dav"
        },
        "files_rightclick": {
            "enabled": "no",
            "installed_version": "1.6.0",
            "types": ""
        },
        "files_sharing": {
            "enabled": "yes",
            "installed_version": "1.20.0",
            "lookupServerUploadEnabled": "no",
            "types": "filesystem"
        },
        "files_texteditor": {
            "enabled": "no",
            "installed_version": "2.8.0",
            "types": ""
        },
        "files_trashbin": {
            "enabled": "yes",
            "installed_version": "1.18.0",
            "types": "filesystem,dav"
        },
        "files_versions": {
            "enabled": "yes",
            "installed_version": "1.21.0",
            "types": "filesystem,dav"
        },
        "firstrunwizard": {
            "enabled": "yes",
            "installed_version": "2.17.0",
            "types": "logging"
        },
        "gallery": {
            "enabled": "no",
            "installed_version": "18.4.0",
            "types": ""
        },
        "logreader": {
            "enabled": "yes",
            "installed_version": "2.13.0",
            "levels": "11111",
            "types": "logging"
        },
        "lookup_server_connector": {
            "enabled": "yes",
            "installed_version": "1.16.0",
            "types": "authentication"
        },
        "mail": {
            "enabled": "yes",
            "installed_version": "3.7.5",
            "types": ""
        },
        "news": {
            "enabled": "yes",
            "installed_version": "24.0.0",
            "types": ""
        },
        "nextcloud_announcements": {
            "enabled": "yes",
            "installed_version": "1.17.0",
            "pub_date": "Thu, 24 Oct 2019 00:00:00 +0200",
            "types": "logging"
        },
        "notes": {
            "enabled": "yes",
            "installed_version": "4.10.1",
            "types": ""
        },
        "notifications": {
            "enabled": "yes",
            "installed_version": "2.16.0",
            "types": "logging"
        },
        "oauth2": {
            "enabled": "yes",
            "installed_version": "1.16.3",
            "types": "authentication"
        },
        "password_policy": {
            "enabled": "yes",
            "enforceHaveIBeenPwned": "1",
            "installed_version": "1.18.0",
            "types": "authentication"
        },
        "passwords": {
            "SSEv1ServerKey": "***key_removed***",
            "backup\/update\/restored": "0",
            "cron\/php\/version\/id": "80221",
            "cron\/php\/version\/string": "8.2.21",
            "enabled": "yes",
            "installed_version": "2024.7.20",
            "legacy_last_used": "1541919484",
            "migration\/customFields": "2020.12.2",
            "migration\/hibp": "1",
            "passwords\/localdb\/type": "hibp",
            "survey\/server\/notification": "1708704004",
            "types": "",
            "web\/php\/version\/id": "80217",
            "web\/php\/version\/string": "8.2.17"
        },
        "photos": {
            "enabled": "yes",
            "installed_version": "2.4.0",
            "lastPlaceMappedUser": "theo",
            "lastPlaceMappingDone": "true",
            "types": "dav,authentication"
        },
        "privacy": {
            "enabled": "yes",
            "installed_version": "1.12.0",
            "types": ""
        },
        "provisioning_api": {
            "enabled": "yes",
            "installed_version": "1.18.0",
            "types": "prevent_group_restriction"
        },
        "recommendations": {
            "enabled": "yes",
            "installed_version": "2.0.0",
            "types": ""
        },
        "related_resources": {
            "enabled": "yes",
            "installed_version": "1.3.0",
            "types": ""
        },
        "serverinfo": {
            "cached_count_filecache": "180645",
            "cached_count_storages": "6",
            "enabled": "yes",
            "installed_version": "1.18.0",
            "types": ""
        },
        "settings": {
            "enabled": "yes",
            "installed_version": "1.10.1",
            "types": ""
        },
        "sharebymail": {
            "enabled": "yes",
            "enforcePasswordProtection": "yes",
            "installed_version": "1.18.0",
            "sendpasswordmail": "no",
            "types": "filesystem"
        },
        "support": {
            "SwitchUpdaterServerHasRun": "yes",
            "enabled": "yes",
            "installed_version": "1.11.1",
            "types": "session"
        },
        "survey_client": {
            "enabled": "yes",
            "installed_version": "1.16.0",
            "types": ""
        },
        "systemtags": {
            "enabled": "yes",
            "installed_version": "1.18.0",
            "types": "logging"
        },
        "text": {
            "enabled": "yes",
            "installed_version": "3.9.2",
            "types": "dav"
        },
        "theming": {
            "enabled": "yes",
            "installed_version": "2.3.0",
            "types": "logging"
        },
        "twofactor_backupcodes": {
            "enabled": "yes",
            "installed_version": "1.17.0",
            "types": ""
        },
        "updatenotification": {
            "bookmarks": "14.2.2",
            "calendar": "4.7.12",
            "contacts": "5.5.3",
            "core": "29.0.4.1",
            "deck": "1.11.4",
            "enabled": "yes",
            "installed_version": "1.18.0",
            "mail": "3.7.5",
            "news": "24.0.0",
            "notes": "4.10.1",
            "passwords": "2024.7.20",
            "types": "",
            "update_check_errors": "0"
        },
        "user_status": {
            "enabled": "yes",
            "installed_version": "1.8.1",
            "types": ""
        },
        "viewer": {
            "enabled": "yes",
            "installed_version": "2.2.0",
            "types": ""
        },
        "weather_status": {
            "enabled": "yes",
            "installed_version": "1.8.0",
            "types": ""
        },
        "workflowengine": {
            "enabled": "yes",
            "installed_version": "2.10.0",
            "types": "filesystem"
        }
    }
}

I never had such an issue anytime I’ve upgraded so far …
I also don’t understand why my other client (kde and android) keep working, although they also use https and go via the same reverse proxy.
So it’s only a web ui issue.

Is your nextcloud_web container’s nginx config the standard one and up-to-date?[1] Alternative, if you’re using your own custom config, please check how your handling js/css/mjs and related assets including caching/etc. You can compare against that link.

On your web container (is this that proxy?), what does your proxy entry entry for Nextcloud look like?

"GET","url":"/nextcloud/index.phping/icon?v=b6589fc6",

The requests in your log that look like this suggest something is up with your path handling, likely in your web server configs.

I also don’t understand why my other client (kde and android) keep working, although they also use https and go via the same reverse proxy. So it’s only a web ui issue.

This is why I suspect there is some special handling for css/js (and perhaps other types) of assets. These would have little impact on non-Web UI connections (though there are some things they possibly impact in Android, such features that trigger the direct editor and initial login setup, which may not be part of your day to day workflow).

As an aside (and likely unrelated, but it is possible), you’re running a very out of date nginx version[2]. It likely has security vulnerabilities and certainly bugs:

image: nginx:1.15.2-alpine

[1] NGINX configuration — Nextcloud latest Administration Manual latest documentation
[2] https://hub.docker.com/_/nginx

the web container is indeed the proxy, I’m handling nextcloud like that :

        location ^~/nextcloud/ {
            proxy_pass         http://nextcloud_web/;
            proxy_set_header   Host $host;
            proxy_set_header   X-Real-IP $remote_addr;
            proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header   X-Forwarded-Host $server_name;
        }

I don’t know what is causing this weird index.phping stuff …

The nextcloud_web is the nginx that serves nextcloud itself. It mostly aligns on the example, except that it’s serving it over http on port 80, since the reverse proxy removes https.

Note that the error code is 403 (unauthorized). I now remember that the very first time I tried to login after upgrading the nextcloud_app container, I was asked to provide a password. It’s was the first time I see that after and upgrade, and I probably didn’t put the one that was expected. Now it doesn’t ask for any password anymore, just gives 403 on css and js …

I can try to upgrade nginx and stick to the example at a maximum, but this 403 and password stuff makes me doubtful …

I have upgraded my nginx (both the proxy and the one for nextcloud) to 1.26.1 and fully aligned the configuration on the documentation and the issue is still there.

But I could spot the root cause, it’s a file permission problem.

from the nextcloud nginx container :

nextcloud_web_1  | 2024/07/24 14:28:08 [error] 31#31: *641 open() "/var/www/html/core/css/server.css" failed (13: Permission denied), client: 192.168.1.92, server: , request: "GET /core/css/server.css?v=b77974a3-0 HTTP/1.0

On the server, all the css files belong to www-data/www-data and have 600 permission. Chmod 644 the file solves the problem.

Is there a better/cleaner way to solve the issue rather than manually chmod’ing all the files on the storage volume ?

1 Like

permissions 644 vs 600 grant read rights on a file for group and other which results in a conclusion your webserver does not run as www-user (or maybe UID of the user differs - e.g. because of different distro).

Thanks for the suggestion but I don’t think the web server is the root cause.

First because I’m using the official nginx docker image, and I didn’t upgrade that one (the problem appeared when I upgraded the nextcloud docker image).

Second, because if I read these lines correctly :

# Serve static files
location ~ \.(?:css|js|mjs|svg|gif|ico|jpg|png|webp|wasm|tflite|map|ogg|flac)$ {
    try_files $uri /nextcloud/index.php$request_uri;

The css and js files are not served directly by the web server but it’s nextcloud index.php that seems to act as a proxy.

So IMHO, the problem is coming from the php engine (that is provided by the nextcloud docker image) that hasn’t the right permission to read the files.

Hope someone can confirm this and suggest proper fix.

btw I don’t know why I missed yesterday 640 for files and 750 for folders is the right permission which I run since years on my (Apache) docker installation…

https://docs.nextcloud.com/server/stable/admin_manual/maintenance/manual_upgrade.html

The default permissions in the fpm image are already 644 on all those files. You should not have to change anything. If those are not the permissions in your environment, it sounds like they were either manually changed or… something. Not sure.

Well I don’t know what went wrong, but to solve the issue, I had to chmod 644 all the files that were 600 (note that 640 was not enough).
I still suspect that the owner of the process that runs index.php (that acts as a proxy to read these files) has changed.
Anyhow, the problem seems to be solved on my side, for now at least.
Thank you all for your comments and support.