[SOLVED] Error: "Some files have not passed the integrity check". INVALID_HASH

I ran:
$ occ integrity:check-core

Output:

  • INVALID_HASH:
    • .htaccess:
      • expected: 60cb065543a840e650166fdb80dae8315e8d62f843947b34e080fbeb5d61780f78d1a875d0320876f6ae5ca607e192d24972a6017bcaa530dd487c7f3cf81f9c
      • current: 60cbgw8fsh9wgwe89eghnb8wsfe83odgnw83nghsiw48nn8933my85hfgd61780f78d1a875d0320876f6ae5ca607e192d24972a6017bcaa530dd487c7f3cf81f9c

This happened after I modified the .htaccess file because of a previous error/recommendation from " Security & setup warnings":

The “X-Content-Type-Options” HTTP header is not set to “nosniff”. This is a potential security or privacy risk, as it is recommended to adjust this setting accordingly.

The documentation said to comment out the line of the .htaccess file:

Header set X-Content-Type-Options “nosniff”

How do I fix the expected hash?

SOLUTION:
sudo -u www-data php /var/www/nextcloud/occ maintenance:update:htaccess

Hi,
I am having the same issue. I tried using the following commands

First
sudo -u www-data php /var/www/nextcloud/occ maintenance:update:htaccess

rescan it same issue then i tried

sudo -u www-data php occ maintenance:repair

rescan same issue. Can anyone please help.
Thanks.

This did not solve the issue.

3 Likes