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

- core
		- .htaccess
		- .user.ini

Raw output
    [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
In my installation i can not find the files.
Delete them or move them to another place.


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

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:

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://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

    • .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;

1 Like

I have the same issues in 26.0.0 beta 3 - I have customized my .user.ini file after install to account for things like:

max_execution_time = 3600
max_input_time = 3600
memory_limit = 2G
file_uploads = On
upload_max_filesize = 16G
max_file_uploads = 20

and now it fails the hash test. I don’t want the defaults and the .user.ini file is where we are supposed to make tweaks rights? How do I get NC to see the new changes as valid or stop the hash test?

EDIT: This seems to be fixed in the latest Beta version: 26.0.0 beta 4

Unfortunately this is now back again in 26.0.0 RC2

Hallo, in welcher DB tabelle kann ich den hash eintragen damit die Warnung verschwindet?

Now fixed again in 26.0.0 RC3

Just installed Version Nextcloud Hub 4 26.0.0 and got the same error. Seems to be back again.

Still not fixed in 26.0.1RC. I’m running NextCloud on an All.inkl, so fare I see, the only way to set the memory limit to 512 is the .user.ini, so it would be nice if this can somehow fixed, also my Nextcloud instance seems to run without a problem.
But if somebody has an hint if there are other way to fix this on all-ink, pls fell welcome.

Any update on this? I was getting the error The PHP memory limit is below the recommended value of 512MB, so I changed all php.ini files of all php installations with the recommended values and rebooted but that still didn’t work, so I tried these values:


in all php.ini files and rebooted again but that also didn’t seem to work, in the end I came across this,nextcloud/.user.ini,-file. so I tried adding


to it, this fixed the PHP memory limit error but also created the errror Some files have not passed the integrity check. List of invalid files… Rescan… For more details see the [documentation ↗](, why is that? Are you not supposed to edit nextcloud/.user.ini manually? If not how are you supposed to edit nextcloud/.user.ini to change things like memory_limit ?