Web UI broken after upgrade to 29.0.10 - MIME type mismatch

  • Nextcloud Server version (e.g., 29.x.x):
    • 29.0.10
  • Operating system and version (e.g., Ubuntu 24.04):
    • docker
  • Web server and version (e.g, Apache 2.4.25):
    • replace me
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • 1.26.1
  • PHP version (e.g, 8.3):
    • 7.2.24
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • after upgrading from 28.0.8 to 29.0.10
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • docker-compose
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

The resource from “https://…/nextcloud/core/css/server.css?v=cfcd2084-0” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).

The resource from “https://…/nextcloud/dist/core-common.js?v=395d5ed3-0” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).

I have “include mime.types;” in my nginx.conf file (reverse proxy).
Full file here : worker_processes 1;error_log /var/log/nginx/error.log warn;pid /v - Pastebin.com

It’s complains about the text/html mime type because the following URL is generating a not found or internal server error or similar (which spits out an HTML page, which is unexpected there):

https://…/nextcloud/core/css/server.css?v=cfcd2084-0

Please monitor your Nextcloud log and error log during these transactions.

There are also clearly some other pieces we’re missing, such as some other reverse proxy in the mix (whatever is handling HTTPS and the routing of what appears to be a subfolder style access method).

Also:

  • Post your Compose file
  • Post your config occ config:list system

OK, it seems to be a permission issue :

nextcloud_web_1 | 2024/12/13 21:24:28 [error] 31#31: *604 open() "/var/www/html/core/css/server.css" failed (
13: Permission denied), client: 192.168.1.76, server: , request: "GET /core/css/server.css?v=cfcd2084-0 HTTP/1
.0", host: ***

All these files are chmod 600.

How is this supposed to work when the web server (nginx) is in a different container ? In my docker-compose file, the web server shares a common volume with the nextcloud container to access /var/www/html.

I’m using nextcloud:29.0.10-fpm-alpine where all the files are chmod 600 and belong to www-data:www-data (82:82).

On the other hand, I’m using nginx:1.26.1-alpine where the nginx process runs with uid:gid 101:101.

Any recommendation to solve that out ?

Solved by replacing default nginx image by GitHub - nginxinc/docker-nginx-unprivileged: Unprivileged NGINX Dockerfiles (and rebuilding the image with uid:gid 82:82)

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.