Boost logo

Boost Users :

Subject: Re: [Boost-users] ipc message_queue getting permission denied
From: Matt Fair (matt.fair_at_[hidden])
Date: 2011-09-29 18:13:10


The code as is, the /tmp/boost_interprocess is not created, which made
me wonder if the shared memory handle is trying to be made somewhere
else. If I call boost::iterprocess::detail::create_tmp_and_clean_old,
it creates /tmp/boost_interprocess with 777 permissions. However even
if this folder is created with the correct write access, I still get
Permission denied when not root user. Which brings me back to my
theory that something else is going on with the shared memory handle
that it isn't being created in /tmp/boost_interprocess. Also to note,
my /tmp dir is also 777.
Thanks,
Matt

2011/9/29 Ion Gaztañaga <igaztanaga_at_[hidden]>:
> El 29/09/2011 23:19, Matt Fair escribió:
>>
>> I tried:
>>       m_messageQueue =
>> boost::shared_ptr<boost::interprocess::message_queue>(
>>            new boost::interprocess::message_queue (
>>              boost::interprocess::open_or_create
>>              ,name.c_str()             //name
>>              ,numElements              //max message number
>>              ,sizeof(Message)          //max message size
>>              ,boost::interprocess::permissions(777)
>>              ));
>>
>> And got the same results as before with Permission denied.  Am I doing
>> something wrong?
>
> Maybe it's a bug, can you check if /tmp/boost_interprocess has enough
> permissions to create a file? We can try to erase it and see if the library
> is creating it with wrong permissions.
>
> Best,
>
> Ion
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net