Integrity check fails for .htaccess and .user.ini

Support intro
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
		- .user.ini

Raw output
==========
Array
(
    [core] => Array
        (
            [INVALID_HASH] => Array
                (
                    [.htaccess] => Array
                        (
                            [expected] => d9cab0f077161bf043d6d85f5bcacbdfaf82913968b7706df9cf7e6f98b11af363f3843b455175ae775567916822fec8f6ab95000ba064c71e05c86a02196d95
                            [current] => cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e
                        )

                    [.user.ini] => Array
                        (
                            [expected] => 4843b3217e91f8536cb9b52700efb20300290292cf6286f92794d4cec99df286afeb7dd6c91b1be20bc55eda541eef230a5c5e7dcd46c189edd0ed1e80c6d3f5
                            [current] => 6ffeabe1a8ce271b1745100f12c7fa1e25030c4b7ee954fb176f9ca1e4c30c6e3a71a1eebd6619f70a26ef647b97b416a19d30efeb04b543797a34a2d9247cfa
                        )

                )

        )

)

Nextcloud version: 24.0.5
Operating system and version: Debian 11 Bullseye (RaspiOS 11)
Apache or nginx version : Apache/2.4.54
PHP version (eg, 7.4): PHP 8.1

The integrity check fails for .htaccess and .user.ini files. Tried to download and replace them from the GitHub page, however, the integrity check still fails.

You must search in the directory
/path/to/nextcloud/core
In my installation i can not find the files.
Delete them or move them to another place.

 .htaccess
 .user.ini

What do you mean by delete them or change its location. The files are found at github, and what is expected is that when you download those files from the source, it should have the same hash. So the question here is how to make these files pass the integrity check, not how to bypass it for those files.

Well, for those who may experience the same issue, I have finally managed to solve it.

Apparently, the files at github (at least the .htaccess and .user.ini) don’t have the same hash as the ones from https://download.nextcloud.com/server/releases/latest.zip

So what I did was to download and unzip the files from the previous link, and then moved the required files to the nextcloud files location.

Also notice that it will be needed to change the group and user for those files.

However, strange issue, since this installation was a fresh one and I followed step by step the official documentation.

Hope this helps others :slight_smile:

Hello,
Nextcloud version: 25.0.2
Debian GNU/Linux 10 (buster)
Apache/2.4.38 (Debian) application server + nginx/1.22.0
PHP 8.1.13
Memory limit: 7 GB
Maximum execution time: 7200
Maximum size to send: 21 GB
Extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, json, Reflection, SPL, session, standard, sodium, cgi-fcgi, mysqlnd, PDO, xml, apcu, bcmath, bz2, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, igbinary, imagick, intl, ldap, exif, memcache, msgpack, mysqli, pdo_mysql, pdo_pgsql, pgsql, Phar, posix, readline, redis, shmop, SimpleXML, smbclient, soap, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, memcached, libsmbclient, ionCube Loader, Zend OPcache

Is correct if I download the [https://download.nextcloud.com/server/releases/latest.zip](https://Latest Nextcloud) and replace the .htaccess and the .user.ini is ok and not show INVALID_HASH
But the my problem is :slight_smile:
I use the php8.1-fpm for hosted the Nextcloud ,
Like you know from this page Uploading big files > 512MB
The part Configuring Your Web server : Nextcloud comes with its own nextcloud/.htaccess file. Because php-fpm can’t read PHP settings in .htaccess these settings must be set in the nextcloud/.user.ini file.
And if I add some parameters in .user.ini after this changed I see the INVALID_HASH

Support intro

php occ integrity:check-core

  • INVALID_HASH:
    • .user.ini:
      • expected: 4843b3217e91f8536cb9b52700efb20300290292cf6286f92794d4cec99df286afeb7dd6c91b1be20bc55eda541eef230a5c5e7dcd46c189edd0ed1e80c6d3f5
      • current: 323c49a15448a2c47ee24f6ed0913f5e4de553b94462a31ea732aaaf11fb75942750ce4a0dd92c7d84a8b9bbb9a97289081d0b6d7fbb0799e35d23dd6a00834f

Is normal and expected or is can be resolv.

P.S. My settings :
PHP 8.1.13
Memory limit: 7 GB
Maximum execution time: 7200
Maximum size to send: 21 GB
I add to the nextcloud domain conf php8.1-fpm pool conf new settings for upload/memory and the nginx .conf :
client_max_body_size 21G;