11.2.4.1 权限
由于UDS套接字由文件系统删的一个节点表示,所以可以使用标准文件系统权限来控制对服务器的访问。
ls -l ./uds_socket
srwxr-xr-x 1 dhellmann dhellmann 0 Aug 21 11:19 uds_socket
sudo chown root ./uds_socket
ls -l ./uds_socket
srwxr-xr-x 1 root dhellmann 0 Aug 21 11:19 uds_sockeet
如果现在客户作为一个用户运行而不是作为root运行,那么这会导致一个错误,因为这个进程没有打开套接字的权限。