Error: net_connect_unix(/run/dovecot/stats-writer) failed: Permission Denied

SYSTEM INFORMATION
OS type and version Debian Linux 11
Webmin version 2.501
Usermin version 2.400
Virtualmin version 7.40.0

So i have this problem that i basically can not use usermin anymore. since i mostly use rouncube for mails i did not notice until now that login with usermin does not work anymore. maybe it is the case since the last update of usermin. the cronjobs with the auto.pl entries created by usermin also show the same permission errors. same as the login - which is:

Error: net_connect_unix(/run/dovecot/stats-writer) failed: Permission Denied

on this website https://www.yakshaving.co.uk/posts/fixing-dovecot-stats-permissions/

he just used one line to fix the error like this:
sudo usermod -a -G dovecot andy
to add user ‘andy’ to the existing ‘dovecot’ group

could u please tell me what the error could have cause or if that fix above may could help? Do you think all my users that want to use usermin need to be in the group dovecot?

What does “I basically can not use usermin anymore” mean? What error are you seeing when you try to log in to Usermin? What appears in the Usermin logs when you try to log in to User?

You don’t need to add random users to the dovecot group.

so when I press the “Login to Usermin” - as I usually did without any issues - in the Virtualmin Menu and Usermin loads up it shows the error messages on the bottom of the screen.

i restared usermin and /var/log/miniserv.error last entries had been as follows:

[09/Sep/2025:18:51:18 +0200] Shutting down
[09/Sep/2025:18:51:18 +0200] Shutting down
[09/Sep/2025:18:51:23 +0200] miniserv.pl started
[09/Sep/2025:18:51:23 +0200] Using MD5 module Digest::MD5
[09/Sep/2025:18:51:23 +0200] Using SHA512 module Crypt::SHA
[09/Sep/2025:18:51:23 +0200] PAM authentication enabled
Prototype mismatch: sub extensions::decode_utf8: none vs ($;$) at /usr/lib/x86_64-linux-gnu/perl-base/Exporter.pm line 66, line 3.
at (eval 171) line 1.
Prototype mismatch: sub extensions::decode_utf8: none vs ($;$) at /usr/lib/x86_64-linux-gnu/perl-base/Exporter.pm line 66, line 3.
at (eval 171) line 1.
Prototype mismatch: sub extensions::decode_utf8: none vs ($;$) at /usr/lib/x86_64-linux-gnu/perl-base/Exporter.pm line 66, line 3.
at (eval 171) line 1.
Prototype mismatch: sub extensions::decode_utf8: none vs ($;$) at /usr/lib/x86_64-linux-gnu/perl-base/Exporter.pm line 66, line 3.
at (eval 171) line 1.
Prototype mismatch: sub extensions::decode_utf8: none vs ($;$) at /usr/lib/x86_64-linux-gnu/perl-base/Exporter.pm line 66, line 3.
at (eval 171) line 1.
Prototype mismatch: sub extensions::decode_utf8: none vs ($;$) at /usr/lib/x86_64-linux-gnu/perl-base/Exporter.pm line 66, line 3.
at (eval 171) line 1.
Prototype mismatch: sub extensions::decode_utf8: none vs ($;$) at /usr/lib/x86_64-linux-gnu/perl-base/Exporter.pm line 66, line 3.
at (eval 173) line 1.
Prototype mismatch: sub extensions::decode_utf8: none vs ($;$) at /usr/lib/x86_64-linux-gnu/perl-base/Exporter.pm line 66, line 3.
at (eval 173) line 1.
Prototype mismatch: sub extensions::decode_utf8: none vs ($;$) at /usr/lib/x86_64-linux-gnu/perl-base/Exporter.pm line 66, line 3.
at (eval 173) line 1.

do u need another log files or that one?

Hmmm, I don’t know what to make of that, I’ve never heard of anyone hitting that error.

Have you modified the Dovecot configuration?


i got a message today from one person that got a domain on that specific server that complained about getting spammend with

that mail from the attached screenshot. he reported today two hours after the update of usermin. maybe there is the connection.
i did not change anything in the last months in my mail configs.

if you want to see any specific config let me know.

I’ve seen this issue after a Usermin or Dovecot update too. Adding the Usermin user to the dovecot group usually fixes the permission error, just like in that link. It’s likely caused by updated permissions on the Dovecot stats socket. You might only need to do it for users accessing mail through Usermin, not all system users.

1 Like

thx for the reply. i am in the process of transfering that specific server anyways. i had turned usermin off - that also “fixed” it since nobody is using it anyways on that machine. then the error message also disappeard.

@Joe,

I can confirm the issue noted in the thread is appearing on Debian 12 with Usermin 2.400. A client reported the issue to me a few days ago, and after checking the logs and doing some other diagnostics was forced to set the file permissions for “stats-writer” to 0666.

Obviously a temporary solution as this loosens the permissions a bit more than desired, but after making the adjustment it stopped creating the error.

I’m actively conducting a search for a solution, but suspect it may be directly or indirectly related to how Usermin is communicating with Dovecot.

This seems like a package problem on Debian, rather than anything we’re doing?

But, maybe I’m misunderstanding what’s happening.

And, I guess we want to fix it, even if it’s not our fault, since it’s annoying and confusing. But, I have no idea what the right solution is. I’m not sure what it’s trying to do.

What is the output of the following command on your Debian system?

ls -la /run/dovecot/stats-writer