UNIX domain sockets not accessable across users?

2010-08-11T19:55:48

I'm running a client/server application on Red Hat Enterprise using ZMQ for message passing. The IPC socket used to associate a client with the server is implemented using a Unix domain socket.

If user A starts the server process, it seems like only clients started by user A can connect to and communicate over that socket. Our project requires that the clients be able to be run by different users, so this is a major sticking point.

The socket is located at /tmp/ipc_assoc with default 755 permissions. chmod 777 does not fix the problem. chown userB allows user B to access the socket, but user A then loses access. Not even root can access the socket. There is no ACL or SeLinux in use on the machine.

Is this typical behavior for Unix domain sockets? Has anyone figured out how to work around it?

Copyright License:
Author:「Dana Leonard」,Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.
Link to:https://stackoverflow.com/questions/3457944/unix-domain-sockets-not-accessable-across-users

About “UNIX domain sockets not accessable across users?” questions

I'm running a client/server application on Red Hat Enterprise using ZMQ for message passing. The IPC socket used to associate a client with the server is implemented using a Unix domain socket. If...
I am planning to use unix domain sockets for my IPC (inter process communication) between two processes running on same host machine. But I have to look into data security also before choosing unix
The example code listed here shows how to make warp listen only on specific hosts. Furtheremore, this post shows some basics on how to use unix domain sockets in Haskell. How can I combine those ...
Just to make sure sure, one can call select on a Unix Domain socket. Correct? Also one can mix different types of sockets in a select statement. Is that correct?
I want to implement IPC in a Cocoa application using UNIX domain sockets, with which I have no experience. I found Apple's CFLocalServer example project, but it's written in C and looks, well, fai...
I want to have a local server in Unix to handle concurrent requests, if it's possible, and whose response would be in binary format. Are the Unix domain sockets right for this task?
Oddly I didn't find this info by googling. What is the cost of establishing connection using Unix Domain sockets versus TCP sockets? Right now I have to do connection pooling with TCP sockets beca...
I am using Unix domain sockets to do some interprocess communication in Linux. Upon connection, the client sends a struct using send to the server. This struct contains some information about the c...
My requirement is to make RPC calls between different processes. By nature these calls are 1-1; meaning single sender single receiver. I am architecturally restricted to use only unix domain socket...
I need to set up some relatively simple IPC for Mac and it needs to be done using UNIX domain sockets. I'm brand new to Swift so while I know this is possible I'm struggling even create my client and

Copyright License:Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.