Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Windows log file locked which prevents debugging #515
Running on Windows 10 interactively, not as a service. Turned on logging parameter as follows:
log_dest file C:\Program Files (x86)\mosquitto\mosquitto.log
Then started mosquitto. Two problems:
You will have to modify the SECURITY_DESCRIPTOR in util_mosq.c to grant relevant access.
For easier access to the log file during testing, I set restrict_read to false in mqtt3_log_init, ie change
This gives me a 'regular' log file I can tail, open in Notepad and reload etc.
The log file issue was introduced by the fix for CVE-2017-9868 which points out that the mosquitto.db file was being created with world readable permissions. The fix should have applied to the creation of new files only and should not attempt to overwrite the security descriptors of existing files. In fact the patched fails when attempting to open any file in "append" mode (such as the log file) so only the first run succeeds and subsequent runs silently fail.