1

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?

mjk
  • 2,443
  • 4
  • 33
  • 33
korhan
  • 301
  • 1
  • 3
  • 6

1 Answers1

3

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.

spraff
  • 32,570
  • 22
  • 121
  • 229