From 4d72bda4c3a6dc9ae774c6bf664e42090360dc7e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 30 Oct 2008 18:03:18 +0100 Subject: [PATCH] listen: set file mode 666 on the unix socket Depending on MPD's umask, the file permissions of the unix socket were too restrictive, and many clients were not able to connect. Do a chmod(0666) on the socket, to allow everybody to connect. --- src/listen.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/listen.c b/src/listen.c index ae2628069..00a21b81b 100644 --- a/src/listen.c +++ b/src/listen.c @@ -176,6 +176,10 @@ static void parseListenConfigParam(unsigned int port, ConfigParam * param) if (establishListen(PF_UNIX, addrp, addrlen) < 0) FATAL("unable to bind to %s: %s\n", param->value, strerror(errno)); + + /* allow everybody to connect */ + chmod(param->value, 0666); + #endif /* HAVE_UN */ } else { #ifdef HAVE_TCP