UnixSocketAddress address = new UnixSocketAddress("/path/to/socket"); UnixSocketChannel channel = UnixSocketChannel.open(address); $ chmod 700 /path/to/socket