title: POSIX message queues permission denied issue
body: <p>I have a <code>server.c</code> program that is initialising a message queue with the following permissions:  </p>
  
  <pre><code>#define SERVER "/serverqueue"
  ...
  struct mq_attr attr;
  attr.mq_flags = 0;
  attr.mq_maxmsg = MAX_MSGS;
  attr.mq_msgsize = MAX_MSG_SIZE;
  attr.mq_curmsgs = 0;
  server = mq_open(SERVER, O_RDWR | O_CREAT, 666, &amp;attr)
  ...
  </code></pre>
  
  <p>In the first run, the <code>mq_open()</code> is successful and the program exits with no error. On subsequent executions, I get <code>Permission denied</code> errors at <code>mq_open()</code>. Why is this happening?<br>
  In case its relevant, I am not explicitly closing/unlinking the message queue descriptors as the OS does that automatically when the program exits, if i am not wrong</p>