Which systems do not honor socket read/write permissions

permissionsportabilitysocket

man 7 unix on Linux states:

In the Linux implementation, sockets which are visible in the file
system honor the permissions of the directory they are in. Their
owner, group and their permissions can be changed. Creation of a new
socket will fail if the process does not have write and search
(execute) permission on the directory the socket is created in.
Connecting to the socket object requires read/write permission. This
behavior differs from many BSD-derived systems which ignore
permissions for UNIX domain sockets.
Portable programs should not rely
on this feature for security.

Which systems ignore permissions for UNIX domain sockets?

Best Answer

HP-UX for example ignores permissions on the socket file.

Note that the docs are talking about permissions on the socket file. All implementations respect permissions on the parent directories - a portable program must make sockets in a private directory, rather than rely on making sockets with restrictive permissions (via umask) in a public directory.

Related Question