Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic security plugin does not save changes #3058

Open
PeterLecky opened this issue May 25, 2024 · 1 comment
Open

Dynamic security plugin does not save changes #3058

PeterLecky opened this issue May 25, 2024 · 1 comment

Comments

@PeterLecky
Copy link

I am on Ubuntu 2022.4 and running mosquitto 2.0.18-0mosquitto1~focal1 from repo at:
http:https://ppa.launchpad.net/mosquitto-dev/mosquitto-ppa/ubuntu
It seems that changes made via dynamic-security api are properly handled and stored in memory, but the json file is not updated (all created users/groups/acls are lost after restart of the daemon).
Relevant part of config:

global

per_listener_settings false
allow_anonymous false
autosave_interval 60
user mosquitto
log_type all
plugin /usr/lib/x86_64-linux-gnu/mosquitto_dynamic_security.so
plugin_opt_config_file /etc/mosquitto/dynamic-security.json

File permissions of json file:
-rw-rw---- 1 mosquitto mosquitto 149194 Sep 6 2023 dynamic-security.json

There is nothing in the log regarding troubles with saving the json file.
Please let me know if I can add more information.
Thanks
Peter

@PeterLecky
Copy link
Author

Good evening,
I found #2967. It is necessary to have also writable access for mosquitto user to directory where is json file stored. This changed probably in 2.16 version, it was not required by older versions. I didn't see that in changelogs, so keeping this opened please documment it in documentation if you believe that it should be mentioned for other users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant