Description of problem: Mosquitto can not load SSL certs with root-only permissions if it is started as user "mosquitto". As of v1.4 Mosquitto loads certificates before dropping to the "mosquitto" user (by default, or whatever is specified in the conf). Relevant section of the mosquitto changelog below: """ Root privileges are now dropped after starting listeners and loading certificates/private keys, to allow private keys to have their permissions restricted to the root user only. Closes bug #452914. """ Steps to Reproduce: 1. Install certificates and keys that are restricted to root user (Let's Encrypt, for instance) 2. Update mosquitto.conf to point to said certs 3. Restart mosquitto Actual results: mosquitto fails to restart, with 'Error: Unable to load CA certificates. Check cafile "/etc/letsencrypt/live/[...]/chain.pem".' Expected results: mosquitto should load the specified certs before dropping to the user specified in mosquitto.conf Additional info: Suggest dropping 'USER="mosquitto"' from the unit file and letting mosquitto handle dropping privileges. This is my first bug report here, sorry if it's not quite right. This is on CentOS 7 with EPEL 7. Thanks!
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle. Changing version to '26'.
This message is a reminder that Fedora 26 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 26. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '26'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 26 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Confirmed this is still and issue with mosquitto 1.5, and dropping the User=mosquitto fixes the problem of starting when there's a cert configured.
mosquitto 1.5 includes a systemd service file under service/systemd, and also includes support for systemd notification. I will remove the systemd unit from the spec and use the one shipped by upstream.
(In reply to Rich Mattes from comment #4) > mosquitto 1.5 includes a systemd service file under service/systemd, and > also includes support for systemd notification. I will remove the systemd > unit from the spec and use the one shipped by upstream. There's some things needed in the service file that aren't included like the network wait: After=network-online.target Wants=network-online.target And also probably the docs line is useful: Documentation=man:mosquitto.conf(5) man:mosquitto(8)
That's fair, I will patch those lines in to the upstream unit file and file a PR upstream.
Built in rawhide, upstream PR is here: https://github.com/eclipse/mosquitto/pull/835 There's still some pending mosquitto updates in bodhi, should I wait for those to get submitted before creating new updates?
I think it's fine to update, it'll just obsolete them. Add the BZ and all should be good
mosquitto-1.5-3.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-cacb23c3bb
mosquitto-1.5-3.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-160bc5c06d
mosquitto-1.5-3.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2018-040d64408b
mosquitto-1.5-3.fc27 has been pushed to the Fedora 27 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-2018-160bc5c06d
mosquitto-1.5-3.fc26 has been pushed to the Fedora 26 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-2018-040d64408b
mosquitto-1.5-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-2018-cacb23c3bb
mosquitto-1.5-3.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.
mosquitto-1.5-3.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.