Code integrity check failure

I get this error below and I don’t have no clue how to correct .htaccess to get rid of this. Also my .htaccess file below.

`
Technical information

The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix
them.
Results

  • core
    • INVALID_HASH
      • .htaccess
        Raw output
        ==========
        Array
        (
        [core] => Array
        (
        [INVALID_HASH] => Array
        (
        [.htaccess] => Array
        (
        [expected] => 4a97aae4d05df89a28bf…
        [current] => a7cb15cfce38d79028749…

This is my .htaccess:

`


SetEnvIfNoCase ^Authorization$ “(.+)” XAUTHORIZATION=$1
RequestHeader set XAuthorization %{XAUTHORIZATION}e env=XAUTHORIZATION


SetEnvIfNoCase Authorization “(.+)” HTTP_AUTHORIZATION=$1



# Add security and privacy related headers
Header set X-Content-Type-Options "nosniff"
Header set X-XSS-Protection "1; mode=block"
Header set X-Robots-Tag "none"
Header set X-Frame-Options "SAMEORIGIN"
Header set X-Download-Options "noopen"
Header set X-Permitted-Cross-Domain-Policies "none"
SetEnv modHeadersAvailable true

Add cache control for CSS and JS files

<FilesMatch “.(css|js)$”>
Header set Cache-Control "max-age=7200, public"



php_value upload_max_filesize 5G
php_value post_max_size 5G
php_value memory_limit 512M
php_value mbstring.func_overload 0
php_value always_populate_raw_post_data -1
php_value default_charset 'UTF-8’
php_value output_buffering 0

SetEnv htaccessWorking true
max_input_time 7200
max_execution_time 7200



php_value upload_max_filesize 5G
php_value post_max_size 5G
php_value memory_limit 512M
php_value mbstring.func_overload 0
php_value default_charset 'UTF-8’
php_value output_buffering 0

SetEnv htaccessWorking true



RewriteEngine on
RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteRule ^.well-known/host-meta /public.php?service=host-meta [QSA,L]
RewriteRule ^.well-known/host-meta.json /public.php?service=host-meta-json [QSA,L]
RewriteRule ^.well-known/carddav /remote.php/dav/ [R=301,L]
RewriteRule ^.well-known/caldav /remote.php/dav/ [R=301,L]
RewriteRule ^remote/(.) remote.php [QSA,L]
RewriteRule ^(build|tests|config|lib|3rdparty|templates)/.
- [R=404,L]
RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/.*
RewriteRule ^(.|autotest|occ|issue|indie|db_|console).* - [R=404,L]


AddType image/svg+xml svg svgz
AddEncoding gzip svgz


DirectoryIndex index.php index.html

AddDefaultCharset utf-8
Options -Indexes

ModPagespeed Off

`

see here:
https://help.nextcloud.com/t/nginx-problems-with-the-code-integrity-check-htaccess/1121

I don’t understand what archive I should download? Also I use ubuntu server not NGINX.

have you copy all data in your folder or do you unzip the data directly in your webfolder?

I haven’t done anything else than modified a bit .htaccess file so I can have 5gb file limit an longer time to upload files.

How did you do nextcloud installed?

Just normal way first installed lamp, then php modules and after that wget nextcloud.

https://techknight.eu/2016/06/15/setup-nextcloud-ubuntu/

bump still have this problem and n real solution found yet.

The fix in that other thread had nothing to do with Nginx/Ubuntu/Apache, but whether hidden files were copied as well as visible ones.

Did you confirm that when you unzipped the archive and moved any files/folders that you also included hidden files (which would include .htaccess)?

the easiest way to fix this is probably to download the install files and delete your old .htaccess and copiy the new one and then modifie it so it suit your needs.

The underlying problem here is that the upload limits are changed. There is an issue about that already open https://github.com/nextcloud/server/issues/121

We plan to fix this so you don’t need to adjust the values again after an update. No ETA yet.

2 Likes

Ok, thanks for your answers. I’ll stick with this because seems like it just shows error message and doesn’t affect the server itself.