I am very new to docker and pretty new to linux so please be gentle!
I am trying to get the official docker mosquitto image to work with a password file. My config file:
persistence true
persistence_location /mosquitto/data/
listener 1883
password_file /mosquitto/config/mqtt_passwd
my run command:
sudo docker run --rm -i -p 1883:1883 -v /volume1/mosquitto:/mosquitto eclipse-mosquitto:latest
when it runs:
1646914188: mosquitto version 2.0.14 starting
1646914188: Config loaded from /mosquitto/config/mosquitto.conf.
1646914188: Error: Unable to open pwfile "/mosquitto/config/mqtt_passwd".
1646914188: Error opening password file "/mosquitto/config/mqtt_passwd".
so the config file and the password file are in the same folder with the same permissions:
-rwxrwxrwx+ 1 1883 1883 114 Mar 10 12:09 mosquitto.conf
-rwxrwxrwx+ 1 1883 1883 121 Mar 10 11:14 mqtt_passwd
this 1883 user is weird. I think that the docker image changes the permissions when it boots up. within the container the permissions are:
---------- 1 mosquitt mosquitt 71 Mar 10 12:18 mosquitto.conf
---------- 1 mosquitt mosquitt 121 Mar 10 11:14 mqtt_passwd
it's strange to me that it can access the config file but it can't access the password file.
Many thanks for any help