server icon indicating copy to clipboard operation
server copied to clipboard

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

Open rosaLux161 opened this issue 2 years ago • 1 comments

⚠️ 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:

  • abc
  • ab
  • dbb
  • etc.

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?

  • [X] Default user-backend (database)
  • [ ] LDAP/ Active Directory
  • [ ] SSO - SAML
  • [ ] Other

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

rosaLux161 avatar Feb 02 '24 12:02 rosaLux161

# 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...

solracsf avatar Feb 02 '24 13:02 solracsf

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.

joshtrichards avatar Aug 01 '24 16:08 joshtrichards