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?
Asked
Active
Viewed 325 times
1 Answers
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
-
I use msgget() to create message queue, so i guess umask has no effect on my ipc. Thx for reply – korhan Jul 07 '11 at 08:01
-
1Does msgget derive from any of the above? You might want to `strace` – spraff Jul 07 '11 at 08:10