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

Running as network service user fails (Windows) #2900

Open
mistoll opened this issue Sep 21, 2023 · 0 comments
Open

Running as network service user fails (Windows) #2900

mistoll opened this issue Sep 21, 2023 · 0 comments

Comments

@mistoll
Copy link

mistoll commented Sep 21, 2023

On windows I want to run mosquitto as user "network service". When changing the user of the mosquitto windows service to "network service" the service fails to start.

To narrow it down I tried to start it manually:

  1. Start "cmd" as user "network service". I used "devxexec.exe /user:NETWORK_SERVICE cmd".
  2. Run mosquitto with config file:
> "C:\Program Files\mosquitto\mosquitto.exe" -c "MY_PATH\mosquitto.conf"
1695297547: Error: Unable to open log file MY_PATH\mosquitto.log for writing.
1695297547: Error: Unable to open pwfile "MY_PATH\passwd.txt".
1695297547: Error opening password file "MY_PATH\passwd.txt".

When I remove "log_dest" and "passwd_file" then mosquitto starts correctly. And so does the windows service.

Both files are opened using mosquitto__fopen with restrict_read=true. I assume it has something to do with the code setting the read restrictions.

Of course I tripple checked the file permission. For example echo "test" > MY_PATH\mosquitto.log works as expected.

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