nextcloud / updater

:arrows_counterclockwise: The updater app to keep your Nextcloud up-to-date
GNU Affero General Public License v3.0
45 stars 33 forks source link

Updater ignores additional config.php files #384

Open PascalReintjens opened 3 years ago

PascalReintjens commented 3 years ago

As it is described in https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html#multiple-config-php-file, it is possible to use multiple config.php files.

Unfortunately, however, the updater.phar file seems to ignore the other config files, which causes the updater to not work properly on some otherwise smoothly running Nextcloud instances.

One problem I and many other Nextcloud users have as a result is the following: There are hosting plans where the basic file path is different when a user accesses Nextcloud via web browser than when, for example, OCC and updater.phar are accessed via SSH. Then a dynamic adjustment of the datadirectory is necessary. This can not be done in the config.php, because this could be overwritten by Nextcloud at any time again to a fixed path when updates are applied or the admin changes other values in the settings and hence the main config file gets rebuilt. Therefore, many fix this by creating a separate config file, like this one at https://github.com/froonix/webhosting-mods/blob/master/httpdocs/nextcloud/nextcloud/config/data.config.php to overwrite the value of the config. This works fine except for the updater.

Users of such and other usecases probably wonder why occ works fine, but the updater.phar has problems and may not get the idea that multiple config files are supported for Nextcloud, but not for the updater. If you have read the documentation you don't expect such a behavior and I could imagine that this is responsible for some bug reports.

mrschaal commented 3 years ago

Also experiencing exactly the same issue on Nextcloud 22, hosted by netcup webhosting plans.

Cr4zyJ0k3r commented 2 years ago

I have the same issue on the same hoster.

homberger commented 2 years ago

I have the same issue on the same hoster.

Me too. Netcup Webhosting.

come-nc commented 6 months ago

Had to revert the PR, reopening this issue.

Ideas on how to proceed in https://github.com/nextcloud/updater/pull/535#issuecomment-2001965206

MasterPuffin commented 4 months ago

What helps in this case is modifying the config with the following

  'datadirectory' => php_sapi_name() === 'cli' ? '/httpdocs/nextcloud/data' : '/var/www/vhosts/{{instance}}.netcup.net/httpdocs/nextcloud/data',

This is however only a temporary fix and Nextcloud also overwrites this line with every update.