1
votes

In Ubuntu Linux, does changing umask of the system (by calling umask() in a program for example), affect the creation and usage of the IPC facilities like message queues on the system?

1

1 Answers

3
votes

From the man page

The umask setting also affects the permissions assigned to POSIX IPC objects (mq_open(3), sem_open(3), shm_open(3)), FIFOs (mkfifo(3)), and UNIX domain sockets (unix(7)) created by the process. The umask does not affect the permissions assigned to System V IPC objects created by the process using msgget(2), semget(2), shmget(2)).

So if your IPC uses the above, then yes. Can you be more specific?

strace myprogram | egrep 'mq_open|sem_open|...' should tell you if you're calling any of these, directly or indirectly.