nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
27.41k stars 4.07k forks source link

[Bug]: Not able to change key dbhost with occ config:system:set to value 'db', all other values are possible #43289

Open rosaLux161 opened 9 months ago

rosaLux161 commented 9 months ago

⚠️ This issue respects the following points: ⚠️

Bug description

Not able to change key dbhost with occ config:system:set to value 'db', all other values are possible for example:

Steps to reproduce

  1. Spin up nextcloud:28.0.2-fpm
  2. Run docker exec -it -u 502 nextcloud-app-1 php /var/www/html/occ config:system:set "dbhost" --value="db"
  3. No change
  4. Run docker exec -it -u 502 nextcloud-app-1 php /var/www/html/occ config:system:set "dbhost" --value="ab"
  5. Changed in config.php

Expected behavior

Change value in config.php

Installation method

Community Docker image

Nextcloud Server version

28

Operating system

Other

PHP engine version

Other

Web server

Nginx

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "28.0.2.5",
        "overwrite.cli.url": "https:\/\/***",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "maintenance": true,
        "maintenance_window_start": 1,
        "theme": "",
        "loglevel": 0,
        "updater.release.channel": "stable",
        "default_phone_region": "DE",
        "preview_max_x": "2048",
        "preview_max_y": "2048",
        "jpeg_quality": "60",
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***"
    }
}

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

solracsf commented 9 months ago
# occ config:system:set dbhost --value=db --type=string
System config value dbhost set to string db

Worked. v27.1.6. Can't test on v28...

joshtrichards commented 3 months ago

Messing with any of the db parameters via occ is a little weird. e.g. See #44924

I'm not really sure there's a good way around this at the moment because of the way that occ works.