Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1662672 - Why synapse folder became owned by root after release upgrade ?
Summary: Why synapse folder became owned by root after release upgrade ?
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: matrix-synapse
Version: 29
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jeremy Cline
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-31 13:47 UTC by Matteo
Modified: 2019-02-04 13:03 UTC (History)
2 users (show)

Fixed In Version: matrix-synapse-0.34.0.1-3.fc28 matrix-synapse-0.34.0.1-3.fc29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-04 11:13:19 UTC
Type: Bug


Attachments (Terms of Use)

Description Matteo 2018-12-31 13:47:23 UTC
Description of problem:

After doing a release upgrade, the owner of folder /etc/synapse is gone to root and this break the system.

Owner of /etc/synapse should not be changed if defined.

How reproducible:
It's happened after a release upgrade from 28 to 29, so i can't reproduce it now excpet if i reinstall all my server.

Steps to Reproduce:
1. Install matrix-synapse on fedora 28 and configure it with synpase user.
2. Do a release upgrade
3. Check your service log (you will see that sqlite db is in read only mode)

Actual results:
Permission issue du to folder owner changes

Expected results:
No change of folder owner

Comment 1 Matteo 2019-01-24 10:31:26 UTC
Hello,

Just to inform that i did a dnf update and this break again my synapse installation.

So the problem appears to be also in a simple "dnf update".

Can you check on this because breaking my system on each dnf update is not normal.

Thanks

Comment 2 Jeremy Cline 2019-01-24 14:01:40 UTC
Hey Matteo,

Sorry, this got lost in the storm of email I went through after the holidays. Looking at the specfile, I would expect the initial installation to mark /etc/synapse as owned by root and that would continue with every upgrade. However, I suppose it should be owned by the synapse user. Is that what you're changing the owner to?

Comment 3 Matteo 2019-01-24 14:26:15 UTC
Hey Jeremy,

No problem, i know that storm ^^

So yes the problem is that because if this folder is owned by root, then you should run synapse with root user and it's a security issue.

To get back on working with synapse user i have to apply the following command after update: sudo chown -R synapse: /etc/synapse

Matrix-synapse admins have confirmed to me that it should run with the synapse user.

Comment 4 Jeremy Cline 2019-01-24 15:34:38 UTC
Okay, great. I've updated Rawhide so /etc/synapse and the config files are owned by synapse and I'll file Bodhi updates shortly (which will close out the bug when it goes to stable). Please test the update and let me know if you have any problems.

Comment 5 Fedora Update System 2019-01-24 16:29:55 UTC
matrix-synapse-0.34.0.1-3.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-99d7d217d6

Comment 6 Fedora Update System 2019-01-24 16:29:58 UTC
matrix-synapse-0.34.0.1-3.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2019-d38643cfa9

Comment 7 Matteo 2019-01-24 16:40:13 UTC
OK sure,

How have i to test ? i wait for an upgrade in dnf ? 

Or should i enable testing repo ?

I'm on fedora 29

Comment 8 Jeremy Cline 2019-01-24 16:56:31 UTC
It should be available in the updates-testing repository sometime tomorrow or you can also download it directly from the build at https://koji.fedoraproject.org/koji/buildinfo?buildID=1182011.

You can install it with "dnf update --enablerepo=updates-testing matrix-synapse" when it arrives in the repository.

Comment 9 Matteo 2019-01-24 17:00:34 UTC
Ok, 

As soon as the testing repo is updated, i'll do the test and i'll come here to give you the result.

Thanks

Comment 10 Fedora Update System 2019-01-25 03:25:49 UTC
matrix-synapse-0.34.0.1-3.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-d38643cfa9

Comment 11 Fedora Update System 2019-01-25 04:29:49 UTC
matrix-synapse-0.34.0.1-3.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-99d7d217d6

Comment 12 Matteo 2019-01-25 09:33:56 UTC
Hi Jeremy,

I saw that the package is pushed but dnf says me no update to do:

sudo dnf update --enablerepo=updates-testing matrix-synapse
Last metadata expiration check: 0:00:46 ago on ven. 25 janv. 2019 10:30:54 CET.
Dependencies resolved.
Nothing to do.
Complete!

For information:
sudo uname -a
Linux melis 4.19.10-300.fc29.x86_64 #1 SMP Mon Dec 17 15:34:44 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

What should i do ?

Comment 13 Jeremy Cline 2019-01-27 14:31:57 UTC
Hey Matteo,

It's likely resolved at this point, but you often need to refresh your metadata when pulling updates that just got pushed out. Adding the "--refresh" flag to dnf will make it fetch the update metadata again.

Comment 14 Matteo 2019-01-27 19:01:46 UTC
Hey Jeremy,

Indeed the --refresh did the trick.

I can confirm that it's ok. No more change of owner after the update.

I restarted also the synapse server to be sure, and no problem.

Big thanks to you

Comment 15 Jeremy Cline 2019-01-27 22:13:59 UTC
Great, glad to hear it. This bug will get closed automatically when the update arrives in the stable repositories.

Comment 16 Fedora Update System 2019-02-04 11:13:19 UTC
matrix-synapse-0.34.0.1-3.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2019-02-04 13:03:43 UTC
matrix-synapse-0.34.0.1-3.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.