Integrity check problems with .user.ini and docker

Nextcloud version: 11.0.2
Operating system and version: Debian GNU/Linux 8
Apache or nginx version: nginx/1.6.2
PHP version: 5.6.29
Is this the first time you’ve seen this error and can you replicate it?: yes

The issue you are facing:
In my ownCloud Docker Container I have a run.sh script that changes some settings in the the /var/www/owncloud/.user.ini file:

sed -i \
    -e 's/^upload_max_filesize=.*/upload_max_filesize=5G/g' \
    -e 's/^post_max_size=.*/post_max_size=5G/g' \
    -e 's/^memory_limit=.*/memory_limit=2048M/g' \
    /var/www/owncloud/.user.ini

When I now run the container and sign in I get this error message:

Some files have not passed the integrity check. Further information on how to resolve this issue can be found in our documentation. (List of invalid files… / Rescan…)

Results

  • core
    • INVALID_HASH
      • .user.ini

The output of your Nextcloud log in Admin > Logging:
no errors

The output of your config.php file:

<?php
$CONFIG = array (
'memcache.local' => '\OC\Memcache\APCu',
'instanceid' => 'ocfefka6wthy',
'passwordsalt' => 'thisisnotmypassword',
'secret' => 'thisisnotmysecret',
'trusted_domains' =>
array (
0 => 'customername.ourdomain.ch',
),
'datadirectory' => '/var/www/owncloud/data',
'overwrite.cli.url' => 'https://customername.ourdomain.ch',
'dbtype' => 'mysql',
'version' => '11.0.2.7',
'dbname' => 'ocdb',
'dbhost' => '10.64.51.5',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => 'ocuser',
'dbpassword' => 'thisisnotmypassword',
'logtimezone' => 'Europe/Zurich',
'installed' => true,
'updatechecker' => 'false',
'default_language' => 'de',
'log_rotate_size' => '104857600',
'maintenance' => false,
'theme' => '',
'loglevel' => 2,
);

The output of your nginx log:
no errors

Is there a way to set those settings without this integrity check error message?

Thanks a lot!