Documentserver: Updating on Debian via apt overwrites default.json AND local.json

Created on 27 May 2020  路  13Comments  路  Source: ONLYOFFICE/DocumentServer

Do you want to request a feature or report a bug?
A bug on Linux.

What is the current behavior?
Updating on Debian via apt overwrites /etc/onlyoffice/documentserver/local.json.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
Just install, change the local.json and update.

What is the expected behavior?
default.json should be updated, but local.json should stay the same

Did this work in previous versions of DocumentServer?
Not sure.

DocumentServer version:
onlyoffice-documentserver v5.5.3-39

Operating System:
Debian GNU/Linux 10 (buster)

Browser version:
(not relevant)

Thank you for the good work.

bug

Most helpful comment

Hi all, not sure what wrong with my original docker trys, but I was able to reproduce this problem with Debian 10 on VirutalBox and Update 5.6.1 -> 5.6.2

I change values of services:secret:inbox:string in /etc/onlyoffice/documentserver/local.json and run an update
Values are reset to default after update finished

Not sure is this problem actual only on Debian and why Ubuntu seems not to have this problem

But I agree this is some kind bug, I created issue 46072 in our private issue tracker

All 13 comments

Hi

Seems I was not able to reproduce your error updating 5.5.1 to 5.5.3 on Ubuntu.
I tryed this:

  1. I created file update.sh
    With content:
sed  -i '2i\  "myverycustom_config": true,' /etc/onlyoffice/documentserver/local.json
echo "deb [trusted=yes] http://download.onlyoffice.com/repo/debian squeeze main" > /etc/apt/sources.list.d/ds.list
apt-get -y update && \
apt-get -o Dpkg::Options::="--force-confnew" -y install onlyoffice-documentserver
cat /etc/onlyoffice/documentserver/local.json | grep 'myverycustom_config'
    2.
docker run --name=ds-to-update -itd -p 80:80 onlyoffice/documentserver:5.5.1
docker cp update.sh ds-to-update:/root
sleep 60 # until all services is intialized
docker exec -it ds-to-update bash /root/update.sh

And myverycustom_config is still in /etc/onlyoffice/documentserver/local.json

So I'll need exact steps from you

Oh, you are actually right, new values are kept, but if I change existing ones like _token enable_ or the _secret strings_, they get overwritten/reset. I used _apt reinstall_ to test and this seems to be done by the postinst script. Does that help? Thanks

Ok, updated script from step 1 to:

sed -i 's/secret/foo_secret/g' /etc/onlyoffice/documentserver/local.json
echo "deb [trusted=yes] http://download.onlyoffice.com/repo/debian squeeze main" > /etc/apt/sources.list.d/ds.list
apt-get -y update && \
apt-get -o Dpkg::Options::="--force-confnew" -y install onlyoffice-documentserver
cat /etc/onlyoffice/documentserver/local.json | grep 'foo_secret'

Those string is not overwritten

Oh, you are actually right, new values are kept, but if I change existing ones like _token enable_ or the _secret strings_, they get overwritten/reset.

I can confirm this. I ran apt-get update yesterday and tokens and secrets where gone afterwards.

@loelkes In that case I need some steps or info how it's different from my test case to reproduce this issue

I have the same issue with every upgrade of onlyoffice-documentserver. I've configured inbox, outbox and browser to true, and I've configured 3 secret strings (documented here https://api.onlyoffice.com/editors/signature/).

I guess we need to make it reproducible for @ShockwaveNN, since increasing number of ppl report this.

@laryllian Yep, you're right, we'll fix this problem as soon as we'll be able to reproduce it, I've tryed earlier in this issue, but no luck

I have this problem since 5.4.x

Every time I upgrade using apt upgrade the local.json file gets overwritten and thus I should change the string value to the one I write in my Nextcloud ONLYOFFICE integration.

This is from a Debian system, I don't know how other system behave.

@laryllian Yep, you're right, we'll fix this problem as soon as we'll be able to reproduce it, I've tryed earlier in this issue, but no luck

  1. Set up Debian server

  2. Install ONLYOFFICE from the debian repo that you guys have.

  3. (when new update come) upgrade using apt upgrade

  4. Onlyoffice can't be accessed

That's the only thing I do. Oh by the way I use this guide to install it: https://nerdonthestreet.com/wiki?find=Install+ONLYOFFICE+for+Nextcloud

Hi all, not sure what wrong with my original docker trys, but I was able to reproduce this problem with Debian 10 on VirutalBox and Update 5.6.1 -> 5.6.2

I change values of services:secret:inbox:string in /etc/onlyoffice/documentserver/local.json and run an update
Values are reset to default after update finished

Not sure is this problem actual only on Debian and why Ubuntu seems not to have this problem

But I agree this is some kind bug, I created issue 46072 in our private issue tracker

Hello, same problem here with ubuntu 18.04 server and Onlyoffice (upgrade 6.0.1 to 6.0.2) installed from repo.

Ran the latest upgrade to 6.0.2.-5 on Ubuntu 18.04, still overwrites local.json, failing the upgrade. It should either skip that file or ask.

Was this page helpful?
0 / 5 - 0 ratings