Skip to content
This repository has been archived by the owner on Feb 14, 2025. It is now read-only.

Error out the socket path #16

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Torxed
Copy link

@Torxed Torxed commented Mar 6, 2023

Previous message was a bit ambiguous:

[1793065/Thread-3 (process_request_thread)] [ERROR] An exception occurred during PROPFIND request on '/': [Errno 13] Permission denied

Even with level = debug it wouldn't show the path specifically which might come in handy (mainly to see that it's actually using the configured path)
This will output more details explaining why and where:

[1793065/Thread-3 (process_request_thread)] [ERROR] Could not connect to /var/spool/postfix/private/radicaleauth: [Errno 13] Permission denied
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/radicale_dovecot_auth/dovecot_auth.py", line 72, in __init__
    self.socket.connect(self.socket_path)
PermissionError: [Errno 13] Permission denied

As well as improve the creation of sockets:

[1793065/Thread-3 (process_request_thread)] [ERROR] Not enough permissions to create unix socket: [Errno 97] Address family not supported by protocol
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/radicale_dovecot_auth/dovecot_auth.py", line 71, in __init__
    self.socket = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
  File "/usr/lib/python3.10/socket.py", line 232, in __init__
    _socket.socket.__init__(self, family, type, proto, fileno)
OSError: [Errno 97] Address family not supported by protocol

The second error usually happens due to the hardening guide of radicale itself, where the .service file prohibits creation of UNIX sockets by default:

RestrictAddressFamilies=~AF_PACKET AF_NETLINK AF_UNIX

And if you forget to do the necessary change this error was a bit vague, this will give a friendly nudge of where to look and add:

RestrictAddressFamilies=
RestrictAddressFamilies=~AF_PACKET AF_NETLINK

Torxed added 2 commits March 6, 2023 12:21
Previous message was a bit ambiguous
Additional permissions might be needed to create unix socket.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant