--------
- /options/query-case-randomization: respect this even on TCP issues (!1732)
- prometheus metrics: make the latency histogram cumulative (!1731, GH#117)
+- fix file permission checks when running as root (!1741)
Knot Resolver 6.0.15 (2025-07-17)
_PermissionMode.EXECUTE: [stat.S_IXUSR, stat.S_IXGRP, stat.S_IXOTH],
}
+ # running outside the manager (client, ...)
if get_permissions_default():
user_uid = getpwnam(USER).pw_uid
user_gid = getgrnam(GROUP).gr_gid
username = USER
+ # running under root privileges
+ elif os.geteuid() == 0:
+ return True
+ # running normally under an unprivileged user
else:
user_uid = os.getuid()
user_gid = os.getgid()
f"Knot Resolver does not run as the default '{USER}' user, but as '{pw_username}' instead."
" This may or may not affect the configuration validation and the proper functioning of the resolver."
)
+ if os.geteuid() == 0:
+ logger.warning(" It is not recommended to run under root privileges unless there is no other option.")
# before starting server, initialize the subprocess controller, config store, etc. Any errors during inicialization
# are fatal