Cygwin >= 1.7.6 open message queues - permission denied

Corinna Vinschen corinna-cygwin@cygwin.com
Wed Oct 6 11:21:00 GMT 2010


On Oct  6 10:13, Manuel Wienand wrote:
> Hi,
> 
> I noticed that I get a permission denied error when I try to open a message queue in the same process or
> in an other process.
> The problem can be reproduced using the code given at: http://sourceware.org/ml/cygwin/2009-09/msg00629.html

Confirmed.  I'll investigate.

> Another thing I noticed is that the execute permission won't be set for the owner of the message queue file.
> E.g. in mq_open I set (S_IRWXU | S_IRWXG | S_IRWXO), but when looking at the created file in the cygwin shell
> (located in /dev/mqueue/) the permissions are set to "-rw-rwxrwx". But it doesn't seem to have any impact on
> the permission denied problem, since the execute permission isn't set in any of the tested versions.

The S_IXUSR bit has no meaning for message queues.  In Cygwin it's used
to signal that the message queue is still being initialized.  The
initializing process always creates the file with S_IXUSR bit.  When the
initalization has been finished, it removes the S_IXUSR bit.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list