Open Lecso11 opened 1 week ago
Apologies, I haven't seen this error about future versions not opening the file with world readable permissions before. My config files are world-readable, owned by root
:
-rw-r--r-- 1 root root 30 Dec 6 2020 include_dir.conf
-rw-r--r-- 1 root root 1354 Jan 20 2021 mosquitto-unraid-default.conf
-rw-r--r-- 1 root root 38812 Oct 28 2020 mosquitto.conf
-rw-r--r-- 1 root root 38754 Nov 7 2018 mosquitto.conf.example
-rw-r--r-- 1 root root 1815 Sep 29 2023 passwd
Note that the definition of users is different between unraid itself and within a docker container... I do not have an unraid-level user for mosquitto at all, and the upstream Mosquitto container is hardcoded to associate mosquitto
with uid 1883
.
I would try explicitly creating your unraid mosquitto
user with the uid and gid of 1883
exactly, and then chown the files to that UID/GID. Or, you can do this from within the mosquitto container through docker exec
- you'll be root by default and can simply chown -R mosquitto:mosquitto /mosquitto/config/*
to use the container's definition of the mosquitto
user, i.e. uid=1883
.
Here's the "after" view of my server after running that chown
command from inside the mosquitto container. See previous post for the "before" view:
# FROM UNRAID'S VIEW, NOTE NO USERNAME FOR UID / GID 1883
root@tower:/mnt/user/appdata/mosquitto# ls -l
total 53
-rw-r--r-- 1 1883 1883 30 Dec 6 2020 include_dir.conf
-rw-r--r-- 1 1883 1883 1354 Jan 20 2021 mosquitto-unraid-default.conf
-rw-r--r-- 1 1883 1883 38812 Oct 28 2020 mosquitto.conf
-rw-r--r-- 1 1883 1883 38754 Nov 7 2018 mosquitto.conf.example
-rw-r--r-- 1 1883 1883 1815 Sep 29 2023 passwd
# FROM CONTAINER'S VIEW
root@tower:/mnt/user/appdata/mosquitto# docker exec -it mosquitto /bin/sh
/ # ls -l mosquitto/config/
total 53
-rw-r--r-- 1 mosquitt mosquitt 30 Dec 6 2020 include_dir.conf
-rw-r--r-- 1 mosquitt mosquitt 1354 Jan 20 2021 mosquitto-unraid-default.conf
-rw-r--r-- 1 mosquitt mosquitt 38812 Oct 28 2020 mosquitto.conf
-rw-r--r-- 1 mosquitt mosquitt 38754 Nov 7 2018 mosquitto.conf.example
-rw-r--r-- 1 mosquitt mosquitt 1815 Sep 29 2023 passwd
I installed the docker container on Unraid with the following config: I followed the instructions in readme adn created an user and password. I uncommented the option 2 in the default config file:
My files have the following permissions: If I set the password file to be readable by anybody, the docker starts, but gives me the error, that future versions will not open this because it has world readable permissions. I created an user in unraid named mosquitto and also in the mosquitto passwd file. What is the problem here?