diff --git a/ChangeLog.txt b/ChangeLog.txt index 5282e1dcdc..53a3dc1339 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -4,6 +4,9 @@ Broker: - Fix persistent clients being incorrectly expired on Raspberry Pis. Closes #1272. +- Windows: Allow other applications access to the log file when running. + Closes #515. + 1.6.3 - 20190618 ================ diff --git a/lib/util_mosq.c b/lib/util_mosq.c index 5e1065e7c4..65fc2215ed 100644 --- a/lib/util_mosq.c +++ b/lib/util_mosq.c @@ -248,7 +248,7 @@ FILE *mosquitto__fopen(const char *path, const char *mode, bool restrict_read) sec.bInheritHandle = FALSE; sec.lpSecurityDescriptor = &sd; - hfile = CreateFile(buf, GENERIC_READ | GENERIC_WRITE, 0, + hfile = CreateFile(buf, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ, &sec, dwCreationDisposition, FILE_ATTRIBUTE_NORMAL, diff --git a/readme-windows.txt b/readme-windows.txt index 9325a4c95a..7bf0d9544d 100644 --- a/readme-windows.txt +++ b/readme-windows.txt @@ -61,3 +61,11 @@ command line as follows: C:\Program Files\mosquitto\mosquitto install C:\Program Files\mosquitto\mosquitto uninstall + +Logging +------- + +If you use `log_dest file ...` in your configuration, the log file will be +created with security permissions for the current user only. If running as a +service, this means the SYSTEM user. You will only be able to view the log file +if you add permissions for yourself or whatever user you wish to view the logs.