Mimetype Warning after upgrading to 28.0.9 or 29.0.5

:warning: Important Note: :warning:

As @rlitman pointed out here, changing any core files, like in this case the file RepairMimeTypes.php, will cause Nextcloud’s integrity check to generate a red warning in the WebUI. (This is also the case for the manual fix provided by @Tiger in this post, by the way.)

So it’s up to you whether you want to apply the patch or not, but I’d say It’s probably not worth the effort, and better to just ignore the mimetype warning for now until an official update is released.

If anyone has already applied the patch and would like to revert it, you can use the instructions here to do so.


Download and apply the patch

Navigate into your Nextcloud server’s root directory (the one that contains status.php file), and then download and apply the patch with the following commands as root or as the webserver user:

Nextcloud 28.0.9:

wget https://github.com/nextcloud/server/pull/47377.patch    
patch -p 1 < 47377.patch

Nextcloud 29.0.5:

wget https://github.com/nextcloud/server/pull/47378.patch
patch -p 1 < 47378.patch

Delete the .patch file!

Do not leave the .patch file in your Nextcloud folder and delete it after the patch has been successfully applied:

Nextcloud 28.0.9:

rm 47377.patch

Nextcloud 29.0.5:

rm 47378.patch

Of course, you could also download it outside your Nextcloud folder and then point to the file in the patch command, as described here, in which case you wouldn’t necessarily have to delete it afterwards, but that would have made it more difficult for me to write a short and universally applicable guide… :wink:

Documentation on how to apply patches:

https://docs.nextcloud.com/server/latest/admin_manual/issues/applying_patch.html

Source for the download links:

https://github.com/nextcloud/server/issues/47359#issuecomment-2301479665

15 Likes