YunoHost-Apps/snappymail_ynh

application upgrade overwrites application.ini

chri2 opened this issue · 2 comments

chri2 commented

Describe the bug

In application.ini are settings stored that can be changed via the snappymail admin page. Especially the username/password for snappymails admin is stored here.

Overwriting the file on upgrade leaves the admin with the snappymail admin interface not accessible, because the admin account is reset and only a cli connection to the yunohost can provide the then newly generated passwort after the admin found the reason why the admin account for snappymail stopped working.

Also all other installation individual settings an admin might have done (like e.g. language, plugin) are reset to the yunohost standard.

Context

  • Hardware: RockPro64 + 2x sata ssd as software raid1
  • YunoHost version: 11.2.5
  • I have access to my server: Through SSH | through the webadmin
  • Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: yes
    • If yes, please explain: multiple domains for email, added aliases as described here
  • Using, or trying to install package version/branch: SnappyMail 2.29.1~ynh1

Steps to reproduce

Upgrade snappymail.

Expected behavior

Settings changed by the admin should be respected during upgrade. If they conflict somehow with proposed yunohost standards there should be diagnostic warnings. Needed changes to the configuration should only automatically happen where they do not conflict with manual settings by the admin.

...and following a probable fix (there were PR on Nov1), I come to report another bug, that fails the upgrade :
touch: cannot touch '/var/www/snappymail/app/data/_data_/_default_/configs/application.ini': No such file or directory

I'm on ynh v11.2.7, and I was upgrading from snappymail 2.28.4~ynh1

Here are my upgrade logs : https://paste.yunohost.org/raw/papuquqeyu

Thanks for your help, it's absolutely not urgent for me 🙂