Server: Updater overwrites user.ini and .htaccess files after every update resulting in loss of custom settings

Created on 24 Aug 2017  路  3Comments  路  Source: nextcloud/server

Steps to reproduce

  1. Upgrade Nextcloud using the the integrated updater

Expected behaviour

Custom settings like maximum upload size should stay the same after the update

Actual behaviour

Values are reset to default (like maximum upload size to 512MB) after an upgrade

General server configuration

Operating system: Linux server 4.4.0-81-generic #104-Ubuntu SMP Wed Jun 14 08:17:06 UTC 2017 x86_64

Web server: Apache/2.4.18 (Ubuntu) (apache2handler)

Database: mysql 5.7.19

PHP version: 7.0.22-0ubuntu0.16.04.1


PHP-modules loaded

 - Core
 - date
 - libxml
 - openssl
 - pcre
 - zlib
 - filter
 - hash
 - Reflection
 - SPL
 - session
 - standard
 - apache2handler
 - mysqlnd
 - PDO
 - xml
 - bcmath
 - bz2
 - calendar
 - ctype
 - curl
 - dom
 - enchant
 - mbstring
 - fileinfo
 - ftp
 - gd
 - gettext
 - gmp
 - iconv
 - igbinary
 - imagick
 - imap
 - interbase
 - intl
 - json
 - ldap
 - exif
 - mcrypt
 - mysqli
 - odbc
 - pdo_dblib
 - PDO_Firebird
 - pdo_mysql
 - PDO_ODBC
 - pdo_pgsql
 - pdo_sqlite
 - pgsql
 - Phar
 - posix
 - pspell
 - readline
 - recode
 - redis
 - shmop
 - SimpleXML
 - smbclient
 - soap
 - sockets
 - sqlite3
 - sysvmsg
 - sysvsem
 - sysvshm
 - tidy
 - tokenizer
 - wddx
 - xmlreader
 - xmlrpc
 - xmlwriter
 - xsl
 - zip
 - libsmbclient
 - Zend OPcache

Nextcloud configuration

Nextcloud version: 12.0.2 - 12.0.2.0

Updated from an older Nextcloud/ownCloud or fresh install: Updated using integrated updater

Where did you install Nextcloud from: Official download from Nextcloud page

Are you using external storage, if yes which one: Array
(
[0] => \OC\Files\Storage\Local
[1] => \OCA\Files_External\Lib\Storage\FTP
[2] => \OC\Files\Storage\DAV
[3] => \OCA\Files_External\Lib\Storage\OwnCloud
[4] => \OCA\Files_External\Lib\Storage\SFTP
[5] => \OCA\Files_External\Lib\Storage\AmazonS3
[6] => \OCA\Files_External\Lib\Storage\Dropbox
[7] => \OCA\Files_External\Lib\Storage\Google
[8] => \OCA\Files_External\Lib\Storage\Swift
[9] => \OCA\Files_External\Lib\Storage\SFTP
[10] => \OCA\Files_External\Lib\Storage\SMB
[11] => \OCA\Files_External\Lib\Storage\SMB
)

Are you using encryption: no

Are you using an external user-backend, if yes which one: YOUR ANSWER HERE (LDAP/ActiveDirectory/Webdav/...)


Signing status

[]


Enabled apps

 - activity: 2.5.2
 - admin_audit: 1.2.0
 - bookmarks: 0.10.1
 - bruteforcesettings: 1.0.2
 - calendar: 1.5.3
 - checksum: 0.3.5
 - circles: 0.12.4
 - comments: 1.2.0
 - contacts: 1.5.3
 - dav: 1.3.0
 - deck: 0.2.1
 - drawio: 0.8.8
 - external: 2.0.3
 - federatedfilesharing: 1.2.0
 - federation: 1.2.0
 - files: 1.7.2
 - files_accesscontrol: 1.2.4
 - files_automatedtagging: 1.2.2
 - files_downloadactivity: 1.1.1
 - files_external: 1.3.0
 - files_markdown: 1.0.1
 - files_pdfviewer: 1.1.1
 - files_reader: 1.0.4
 - files_retention: 1.1.2
 - files_sharing: 1.4.0
 - files_texteditor: 2.4.1
 - files_trashbin: 1.2.0
 - files_versions: 1.5.0
 - files_videoplayer: 1.1.0
 - firstrunwizard: 2.1
 - flowupload: 0.4
 - gallery: 17.0.0
 - gpxedit: 0.0.7
 - gpxmotion: 0.0.5
 - gpxpod: 2.2.0
 - guests: 0.5.0
 - issuetemplate: 0.2.2
 - keeweb: 0.4.0
 - logreader: 2.0.0
 - lookup_server_connector: 1.0.0
 - metadata: 0.5.0
 - mozilla_sync: 1
 - music: 0.4.4
 - news: 11.0.5
 - nextcloud_announcements: 1.1
 - notifications: 2.0.0
 - oauth2: 1.0.5
 - ocdownloader: 1.5
 - ocsms: 1.12.1
 - onlyoffice: 1.1.3
 - ownbackup: 17.5.0
 - ownnote: 1.08
 - passman: 2.1.4
 - password_policy: 1.2.2
 - provisioning_api: 1.2.0
 - radio: 0.6.0
 - rainloop: 5.0.0
 - ransomware_protection: 1.0.1
 - richdocuments: 1.12.34
 - serverinfo: 1.2.0
 - sharebymail: 1.2.0
 - socialsharing_email: 1.0.1
 - spreed: 2.0.1
 - survey_client: 1.0.0
 - systemtags: 1.2.0
 - tasks: 0.9.5
 - theming: 1.3.0
 - twofactor_backupcodes: 1.1.1
 - twofactor_totp: 1.3.1
 - updatenotification: 1.2.0
 - weather: 1.5.0
 - workflowengine: 1.2.0


Disabled apps

 - encryption
 - user_external
 - user_ldap


Content of config/config.php

{
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "***REMOVED SENSITIVE VALUE***"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "mysql",
    "version": "12.0.2.0",
    "installed": true,
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpmode": "smtp",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "forcessl": true,
    "auth.bruteforce.protection.enabled": true,
    "mail_smtpauthtype": "PLAIN",
    "mail_smtpauth": true,
    "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpport": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpsecure": "tls",
    "filesystem_check_changes": 1,
    "theme": "",
    "maintenance": false,
    "secret": "***REMOVED SENSITIVE VALUE***",
    "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
    "forceSSLforSubdomains": true,
    "loglevel": 0,
    "logtimezone": "***REMOVED SENSITIVE VALUE***",
    "custom_csp_policy": "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; frame-src *; img-src *; font-src 'self' data:; media-src *",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "localhost",
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "memcache.local": "\\OC\\Memcache\\Redis",
    "redis": {
        "host": "localhost",
        "port": 6379
    },
    "memcache.locking": "\\OC\\Memcache\\Redis",
    "trashbin_retention_obligation": "auto",
    "updatechecker": false,
    "log_rotate_size": 104857600,
    "htaccess.RewriteBase": "***REMOVED SENSITIVE VALUE***",
    "mysql.utf8mb4": true
}

Logs


Web server error log

Insert your webserver log here


Nextcloud log (data/nextcloud.log)

Insert your Nextcloud log here


Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...

Most helpful comment

@MorrisJobke Well, then there is still a UI problem because the maximum upload size can be set from the web interface in the admin settings. If it gets reset every time then it would be better not to have it at all and tell people that the only way to change it is by changing their php configuration.

You only talk about the .htaccess file, but this setting is stored in the .user.ini file after all.

All 3 comments

Duplicate of #4769

See https://github.com/nextcloud/server/issues/4769#issuecomment-322219262 for details

@MorrisJobke Well, then there is still a UI problem because the maximum upload size can be set from the web interface in the admin settings. If it gets reset every time then it would be better not to have it at all and tell people that the only way to change it is by changing their php configuration.

You only talk about the .htaccess file, but this setting is stored in the .user.ini file after all.

@MorrisJobke Well, then there is still a UI problem because the maximum upload size can be set from the web interface in the admin settings. If it gets reset every time then it would be better not to have it at all and tell people that the only way to change it is by changing their php configuration.

usually this is also stored in the DB and will get properly written to those files again. cc @LukasReschke

Otherwise that is a separate bug.

Was this page helpful?
0 / 5 - 0 ratings