Closed Paraphraser closed 8 months ago
Hi @Paraphraser did a new installation from scratch, restored the backup from #731
pi@singerhaus:~/IOTstack $ sudo ls -lrt ./volumes/mosquitto/pwfile
total 4
-rw------- 1 root root 132 Oct 11 00:03 pwfile
Now the pwfile has other permissions, but mosquitto isn't starting. Maybe because of this changed ? "reset the password file" and "create username and password" doesn't work as before.
I've just pushed an update to #734 to resolve this problem. We await the pleasure of @Slyke to get this applied.
If you need a workaround:
~/IOTstack/.templates/mosquitto/docker-entrypoint.sh
in a text editor.chown -c root:root "$PWFILE"
and delete it.Rebuild the container:
$ cd ~/IOTstack
$ docker-compose up -d --build mosquitto
Once this becomes available on GitHub, you'll need to revert the edited file:
$ cd ~/IOTstack/.templates/mosquitto
$ git restore docker-entrypoint.sh
$ git pull
Thanks for the workaround, works perfect!
The folder structure for a newly-created or self-repaired persistent store assumes ownership of id 1883 (which is "mosquitto" inside the container) and file/folder modes copied from the
iotstack_defaults
folder hierarchy.Investigations during #731 revealed that Mosquitto now wants the password file to be owned by root with a mode of 600.
Although the mode requirement could be accommodated by changing the
iotstack_defaults
structure, the ownership requirement can't be met that way.This fix adds the necessary
chown
andchmod
commands to the entry-point script.