diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6b5288b32a58c463674d5d77fb46a6a4c1878dee..5c140c88e24a2f548ded920fccd90782676317c7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,7 +27,7 @@ option(LWS_WITH_HTTP2 "Compile with server support for HTTP/2" OFF)
 option(LWS_WITH_LWSWS "Libwebsockets Webserver" OFF)
 option(LWS_WITH_CGI "Include CGI (spawn process with network-connected stdin/out/err) APIs" OFF)
 option(LWS_IPV6 "Compile with support for ipv6" OFF)
-option(LWS_UNIX_SOCK "Compile with support for UNIX domain socket" OFF)
+option(LWS_UNIX_SOCK "Compile with support for UNIX domain socket" ON)
 option(LWS_WITH_PLUGINS "Support plugins for protocols and extensions" OFF)
 option(LWS_WITH_HTTP_PROXY "Support for rewriting HTTP proxying (requires libhubbub)" OFF)
 option(LWS_WITH_ZIP_FOPS "Support serving pre-zipped files" OFF)
diff --git a/lib/core/libwebsockets.c b/lib/core/libwebsockets.c
index eeb9e168ffdf59ba14f535ea13d70447de544773..351db79ad2ce1ba404c374b1f2c5bce387350c57 100644
--- a/lib/core/libwebsockets.c
+++ b/lib/core/libwebsockets.c
@@ -2593,9 +2593,11 @@ lws_socket_bind(struct lws_vhost *vhost, lws_sockfd_type sockfd, int port,
 	}
 
 #if defined(LWS_WITH_UNIX_SOCK)
-	if (LWS_UNIX_SOCK_ENABLED(vhost) && vhost->context->uid) {
-		chown(serv_unix.sun_path, vhost->context->uid, vhost->context->gid);
-	}
+	if (LWS_UNIX_SOCK_ENABLED(vhost) && vhost->context->uid)
+		if (chown(serv_unix.sun_path, vhost->context->uid,
+			    vhost->context->gid))
+			lwsl_notice("%s: chown for unix skt %s failed\n",
+				    __func__, serv_unix.sun_path);
 #endif
 
 #ifndef LWS_PLAT_OPTEE